Open In App
Related Articles

Top 50 String Coding Problems for Interviews

Like Article
Save Article
Report issue

Here is the collection of the Top 50 list of frequently asked interview questions on Strings. Problems in this Article are divided into three Levels so that readers can practice according to the difficulty level step by step. 


Level 1



Reverse words in a given stringSolve
Longest Common PrefixSolve
Roman Number to IntegerSolve
Integer to RomanSolve
Closest StringsSolve
Divisible by 7Solve
Encrypt the String – IISolve
Equal point in a string of bracketsSolve
Isomorphic StringsSolve
Check if two strings are k-anagrams or notSolve
Panagram CheckingSolve
Minimum DeletionsSolve
Number of Distinct SubsequencesSolve
Check if string is rotated by two placesSolve

Level 2



Implement AtoiSolve
Validate an IP addressSolve
License Key FormattingSolve
Find the largest word in dictionarySolve
Equal 0,1, and 2Solve
Find and replace in String 
Add Binary StringsSolve
Sum of two large numbersSolve
Multiply two stringsSolve
Look and say PatternSolve
Minimum times A has to be repeated to make B a SubstringSolve
Excel Sheet – ISolve
Form a PalindromeSolve
Find the N-th characterSolve
Next higher palindromic number using the same set of digitsSolve
Length of longest prefix suffixSolve
Longest K unique characters substringSolve
Smallest window in string containing all charactersSolve
Longest Palindromic SubsequenceSolve
Longest substring without repeating charactersSolve
Substrings of length k with k-1 distinct elementsSolve
Count number of substringsSolve
Interleaved StringsSolve
Print Anagrams togetherSolve
Rank the permutationSolve
A Special KeyboardSolve

Level 3

Restrictive Candy CrushSolve
Edit DistanceSolve
Search Pattern (KMP-Algorithm)Solve
Search Pattern (Rabin-Karp Algorithm)Solve
Search Pattern (Z-algorithm)Solve
Shortest Common SupersequenceSolve
Number of words with K maximum distinct vowelsSolve
Longest substring to form a PalindromeSolve
Longest Valid ParenthesisSolve
Distinct Palindromic SubstringsSolve

Related Articles:

Some other important Tutorials:

Last Updated : 26 Feb, 2024
Like Article
Save Article
Share your thoughts in the comments
Similar Reads