Reverse a String

Easy
5 views 25 Jan 2026
Print the reverse of the given string....

Count Vowels

Easy
6 views 25 Jan 2026
Count vowels (a,e,i,o,u) in the string, case-insensitive....

Title Case

Easy
4 views 25 Jan 2026
Capitalize the first letter of each word (words separated by spaces)....

Palindrome Check

Easy
4 views 25 Jan 2026
Check if the string is a palindrome ignoring spaces and case....

Word Count

Easy
5 views 25 Jan 2026
Count how many words are in the string (words separated by spaces)....

Run-Length Encode

Medium
5 views 25 Jan 2026
Compress the string using run-length encoding like a3b2....

First Non-Repeating Character

Medium
5 views 25 Jan 2026
Print the first character that appears only once. If none, print -1....

Anagram Check

Medium
4 views 25 Jan 2026
Given two strings, check if they are anagrams (ignore spaces, case-insensitive)....

Remove Duplicate Characters

Medium
4 views 25 Jan 2026
Remove duplicate characters but keep the first occurrence (spaces included)....

Longest Word

Medium
5 views 25 Jan 2026
Print the longest word in the line (if tie, print the first)....

Rotation Check

Medium
3 views 25 Jan 2026
Check if b is a rotation of a (case-sensitive). Print YES or NO....

Count Substring Occurrences

Medium
4 views 25 Jan 2026
Count how many times pattern p occurs in s (overlaps allowed)....

Longest Common Prefix

Hard
4 views 25 Jan 2026
Given n strings, print their longest common prefix (or empty)....

KMP Count Pattern

Hard
5 views 25 Jan 2026
Count how many times pattern p appears in s (overlaps allowed) using KMP....

Longest Substring Without Repeat

Hard
4 views 25 Jan 2026
Find the length of the longest substring with all unique characters....

Remove Adjacent Duplicates

Hard
5 views 25 Jan 2026
Repeatedly remove adjacent equal characters. Print the final string....

Longest Palindromic Substring Length

Hard
4 views 25 Jan 2026
Print the length of the longest palindromic substring (expand-around-center)....

Decode Bracket String

Hard
4 views 25 Jan 2026
Decode pattern like 3[a2[c]] -> accaccacc....

Find All Anagram Starts

Hard
4 views 25 Jan 2026
Given s and p (lowercase), print all start indices where an anagram of p begins....

Rearrange Without Adjacent Equals

Hard
5 views 25 Jan 2026
Rearrange the string so that no two adjacent characters are the same. If not possible, print IMPOSSIBLE....