TARGETROOT
ToolsBlogPracticeInterview
CODING TOPICS
Coding Topics
General Coding Problems
MCQ Topics
All Programming TopicsView All Practice
HomePracticeProgrammingGeneral Coding Problems

General Coding Problems

General Coding Problems

40problems · Write code, run tests, and submit solutions

Coding Practice

Select a language, write your solution, and click Run to test.

Click Submit to evaluate your code against all test cases.

Mark a problem as completed when you're done.

0/40 done
Problem 1 of 40
Problem 1Easy ·

Write a program to count vowels and consonants in a string.

fn countVowelsConsonants(s: &str) -> (usize, usize)
fn countVowelsConsonants(s: &str) -> (usize, usize)
Sample #1
Input: hello world
Expected: 3 7
Sample #2
Input: AEIOU
Expected: 5 0
Test #3
Input: bcdfg
Expected: 0 5
Test #4
Input: Programming
Expected: 3 8
View Solution & Explanation
Iterate through characters, check alphabets, and count vowels separately from consonants.

All Problems

TARGETROOT

Learning and practice platform built for focused growth. Start lean with tools, blog content, interview prep, and JSON-driven tests.

Platform

  • Tools
  • Blog
  • Practice
  • Interview

Learn

  • About
  • Contact

Legal

  • Privacy Policy
  • Terms of Service

Quick Access

  • JSON Formatter
  • Image Compressor
  • JSON to XLSX
  • QR Code Generator

© 2026 TARGETROOT. All rights reserved.

Made for focused learners worldwide