String Length Info

Easy
4 views 24 Jan 2026
Input is a single string s is provided (can contain spaces). Output its length, first character and last character. If string is empty, output 0 - -....

Reverse String

Easy
3 views 24 Jan 2026
Input is a single string s is provided (no trailing spaces needed). Output the reversed string....

Count Vowels

Easy
2 views 24 Jan 2026
A string s is provided. Count how many vowels (a,e,i,o,u) are present (both cases). Output the count....

Toggle Case

Easy
3 views 24 Jan 2026
A string s is provided. Convert lowercase to uppercase and uppercase to lowercase. Other characters keep same. Output final string....

Remove Spaces

Easy
3 views 24 Jan 2026
A string s is provided. Remove all space characters and output the new string....

Palindrome Check

Easy
3 views 24 Jan 2026
A string s (only letters and digits) is provided. Output YES if it is palindrome else NO....

Count Character

Easy
3 views 24 Jan 2026
A string s is provided and a character ch is provided. Count how many times ch occurs in s....

Replace Character

Easy
2 views 24 Jan 2026
A string s is provided, and two characters a and b. Replace every a with b and output result....

Join Words with Dash

Easy
2 views 24 Jan 2026
A sentence line is provided with words separated by spaces. Join words using '-' and output....

Prefix Check

Easy
2 views 24 Jan 2026
Read two strings s and p. Output YES if s starts with p else NO....

Run Length Encode

Medium
3 views 24 Jan 2026
A string s is provided. Compress it using run-length encoding as: char followed by count (only when count>1). Output encoded string....

Run Length Decode

Medium
2 views 24 Jan 2026
An encoded string is provided like a3b2c (letters with optional number). Decode and output the original string....

Longest Word

Medium
2 views 24 Jan 2026
A sentence is provided. Words are separated by spaces. Output the longest word. If tie, output the first one....

Remove Consecutive Duplicates

Medium
3 views 24 Jan 2026
A string s is provided (no spaces). Remove consecutive duplicate characters and output result....

First Unique Character

Medium
3 views 24 Jan 2026
A string s is provided (no spaces). Output the first character that appears exactly once. If none, output -1....

Anagram Check

Medium
4 views 24 Jan 2026
Input has two strings a and b are provided (lowercase letters). Output YES if they are anagrams else NO....

Rotate String by K

Medium
3 views 24 Jan 2026
A string s and integer k are provided. Rotate string to the right by k positions and output....

Check Balanced Parentheses

Medium
4 views 24 Jan 2026
A string s is provided containing only '(' and ')'. Output YES if it is balanced else NO....

All Indices of Substring

Medium
2 views 24 Jan 2026
Read two strings s and p. Output all starting indices (0-based) where p occurs in s. If none, output -1....

String to Integer Parser

Medium
2 views 24 Jan 2026
A string s is provided (maybe with leading spaces and sign). Parse first integer like simple atoi. If no number, output 0....

Longest Common Prefix

Medium
2 views 24 Jan 2026
Read n strings. Output their longest common prefix. If no common prefix, output EMPTY....

Remove All Digits

Medium
2 views 24 Jan 2026
A string s is provided. Remove all digits (0-9) and output remaining string....

Smallest Character Window

Medium
3 views 24 Jan 2026
A string s is provided and integer k. Output the lexicographically smallest substring of length k. If k>len(s), output EMPTY....

Reverse Words

Medium
2 views 24 Jan 2026
A sentence is provided. Reverse order of words and output. Extra spaces should be treated as separators....

KMP Pattern Count

Hard
3 views 24 Jan 2026
Read two strings text and pattern. Count how many times pattern occurs in text (overlapping allowed). Output the count....

Longest Palindromic Substring Length

Hard
2 views 24 Jan 2026
A string s is provided (no spaces). Compute length of longest palindromic substring. Use linear-time method....

Decode Nested Repeat

Hard
4 views 24 Jan 2026
A string is provided in form like 3[a2[c]] where number means repeat. Decode and output the final string....

Remove Pattern Repeatedly

Hard
2 views 24 Jan 2026
Read two strings s and p. Remove every occurrence of p from s while scanning left to right (like stack remove). Output final string....

Smallest Rotation

Hard
3 views 24 Jan 2026
A string s is provided. Consider all rotations of s. Output the lexicographically smallest rotation....

Wildcard Match

Hard
2 views 24 Jan 2026
Read string s and pattern p with '?' (any char) and '*' (any sequence). Output YES if pattern matches whole string else NO....

Minimum Insertions Palindrome

Hard
3 views 24 Jan 2026
A string s is provided (no spaces). Compute minimum insertions needed to make it a palindrome. Output the number....

Smallest Subsequence of Length K

Hard
3 views 24 Jan 2026
A string s and integer k are provided. Pick a subsequence of length k (keep order) with smallest lexicographic value. Output that subsequence....

Big Integer Addition

Hard
3 views 24 Jan 2026
Two non-negative integers a and b are provided as strings (very large). Output a+b....

Isomorphic Strings

Medium
3 views 24 Jan 2026
Input has two strings s and t are provided (same length). Two strings are isomorphic if each character in s can be mapped to exactly one character in t and vice-versa. Output YES or NO....

Z Pattern Count

Hard
3 views 24 Jan 2026
Read two strings text and pattern. Count how many times pattern occurs in text (overlapping allowed). Use Z algorithm logic and output count....