String Interview Questions

Character arrays, parsing, pattern matching, and text algorithms.

268 problems

#Title
5Longest Palindromic Substring
6ZigZag Conversion
8String to Integer (atoi)
14Longest Common Prefix
28Implement strStr()
38Count and Say
43Multiply Strings
58Length of Last Word
67Add Binary
68Text Justification
125Valid Palindrome
151Reverse Words in a String
161One Edit Distance
165Compare Version Numbers
186Reverse Words in a String II
214Shortest Palindrome
242Valid Anagram
271Encode and Decode Strings
273Integer to English Words
306Addictive Number
383Ransom Note
405Convert a Number to Hexadecimal
408Valid Word Abbreviation
415Add Strings
420Strong Password Checker
434Number of Segments in a String
443String Compression
459Repeated Substring Pattern
468Validate IP Address
481Magical String
482License Key Formatting
500Keyboard Row
520Detect Capital
521Longest Uncommon Subsequence I
522Longest Uncommon Subsequence II
524Longest Word in Dictionary through Deleting
527Word Abbreviation
539Minimum Time Difference
541Reverse String II
551Student Attendance Record I
555Split Concatenated Strings
556Next Greater Element III
557Reverse Words in a String III
564Find the Closest Palindrome
591Tag Validator
616Add Bold Tag in String
647Palindromic Substrings
648Replace Words
657Robot Return to Origin
678Valid Parenthesis String
680Valid Palindrome II
681Next Closest Time
686Repeated String Match
696Count Binary Substrings
709To Lower Case
720Longest Word in Dictionary
722Remove Comments
751IP to CIDR
758Bold Words in String
791Custom Sort String
796Rotate String
804Unique Morse Code Words
806Number of Lines To Write String
809Expressive Words
816Ambiguous Coordinates
819Most Common Word
820Short Encoding of Words
824Goat Latin
831Masking Personal Information
833Find And Replace in String
839Similar String Groups
848Shifting Letters
859Buddy Strings
880Decoded String at Index
884Uncommon Words from Two Sentences
890Find and Replace Pattern
893Groups of Special-Equivalent Strings
916Word Subsets
917Reverse Only Letters
925Long Pressed Name
929Unique Email Addresses
939Minimum Area Rectangle
942DI String Match
944Delete Columns to Make Sorted
953Verifying an Alien Dictionary
955Delete Columns to Make Sorted II
1016Binary String With Substrings Representing 1 To N
1023Camelcase Matching
1056Confusing Number
1061Lexicographically Smallest Equivalent String
1071Greatest Common Divisor of Strings
1078Occurrences After Bigram
1100Find K-Length Substrings With No Repeated Characters
1108Defanging an IP Address
1119Remove Vowels from a String
1147Longest Chunked Palindrome Decomposition
1177Can Make Palindrome from Substring
1178Number of Valid Words for Each Puzzle
1189Maximum Number of Balloons
1233Remove Sub-Folders from the Filesystem
1271Hexspeak
1309Decrypt String from Alphabet to Integer Mapping
1324Print Words Vertically
1328Break a Palindrome
1332Remove Palindromic Subsequences
1347Minimum Number of Steps to Make Two Strings Anagram
1370Increasing Decreasing String
1371Find the Longest Substring Containing Vowels in Even Counts
1374Generate a String With Characters That Have Odd Count
1392Longest Happy Prefix
1408String Matching in an Array
1410HTML Entity Parser
1417Reformat The String
1422Maximum Score After Splitting a String
1436Destination City
1446Consecutive Characters
1455Check If a Word Occurs As a Prefix of Any Word in a Sentence
1461Check If a String Contains All Binary Codes of Size K
1496Path Crossing
1507Reformat Date
1528Shuffle String
1529Bulb Switcher IV
1540Can Convert String in K Moves
1542Find Longest Awesome Substring
1544Make The String Great
1545Find Kth Bit in Nth Binary String
1554Strings Differ by One Character
1556Thousand Separator
1573Number of Ways to Split a String
1576Replace All ?'s to Avoid Consecutive Repeating Characters
1592Rearrange Spaces Between Words
1598Crawler Log Folder
1614Maximum Nesting Depth of the Parentheses
1624Largest Substring Between Two Equal Characters
1638Count Substrings That Differ by One Character
1662Check If Two String Arrays are Equivalent
1668Maximum Repeating Substring
1678Goal Parser Interpretation
1684Count the Number of Consistent Strings
1694Reformat Phone Number
1698Number of Distinct Substrings in a String
1704Determine if String Halves Are Alike
1763Longest Nice Substring
1768Merge Strings Alternately
1784Check if Binary String Has at Most One Segment of Ones
1790Check if One String Swap Can Make Strings Equal
1796Second Largest Digit in a String
1805Number of Different Integers in a String
1813Sentence Similarity III
1816Truncate Sentence
1832Check if the Sentence Is Pangram
1839Longest Substring Of All Vowels in Order
1844Replace All Digits with Characters
1854Maximum Population Year
1858Longest Word With All Prefixes
1876Substrings of Size Three with Distinct Characters
1880Check if Word Equals Summation of Two Words
1903Largest Odd Number in String
1910Remove All Occurrences of a Substring
1933Check if String Is Decomposable Into Value-Equal Substrings
1935Maximum Number of Words You Can Type
1957Delete Characters to Make Fancy String
1961Check If String Is a Prefix of Array
1963Minimum Number of Swaps to Make the String Balanced
1967Number of Strings That Appear as Substrings in Word
1974Minimum Time to Type Word Using Special Typewriter
2000Reverse Prefix of Word
2042Check if Numbers Are Ascending in a Sentence
2047Number of Valid Words in a Sentence
2048Next Greater Numerically Balanced Number
2081Sum of k-Mirror Numbers
2103Rings and Rods
2108Find First Palindromic String in the Array
2109Adding Spaces to a String
2114Maximum Number of Words Found in Sentences
2116Check if a Parentheses String Can Be Valid
2124Check if All A's Appears Before All B's
2129Capitalize the Title
2131Longest Palindrome by Concatenating Two Letter Words
2135Count Words Obtained After Adding a Letter
2138Divide a String Into Groups of Size k
2156Find Substring With Given Hash Value
2157Groups of Strings
2168Unique Substrings With Equal Digit Frequency
2185Counting Words With a Given Prefix
2186Minimum Number of Steps to Make Two Strings Anagram II
2211Count Collisions on a Road
2213Longest Substring of One Repeating Character
2223Sum of Scores of Built Strings
2232Minimize Result by Adding Parentheses to Expression
2243Calculate Digit Sum of a String
2255Count Prefixes of a Given String
2264Largest 3-Same-Digit Number in String
2269Find the K-Beauty of a Number
2272Substring With Largest Variance
2273Find Resultant Array After Removing Anagrams
2278Percentage of Letter in String
2288Apply Discount to Prices
2299Strong Password Checker II
2301Match Substring After Replacement
2315Count Asterisks
2381Shifting Letters II
2390Removing Stars From a String
2414Length of the Longest Alphabetical Continuous Substring
2416Sum of Prefix Scores of Strings
2490Circular Sentence
2496Maximum Value of a String in an Array
2575Find the Divisibility Array of a String
2586Count the Number of Vowel Strings in Range
2678Number of Senior Citizens
2710Remove Trailing Zeros From a String
2729Check if The Number is Fascinating
2788Split Strings by Separator
2800Shortest String That Contains Three Strings
2810Faulty Keyboard
2828Check if a String Is an Acronym of Words
2843Count Symmetric Integers
2851String Transformation
2937Make Three Strings Equal
2942Find Words Containing Character
2967Minimum Cost to Make Array Equalindromic
3019Number of Changing Keys
3023Find Pattern in Infinite Stream I
3029Minimum Time to Revert Word to Initial State I
3031Minimum Time to Revert Word to Initial State II
3034Number of Subarrays That Match a Pattern I
3036Number of Subarrays That Match a Pattern II
3037Find Pattern in Infinite Stream II
3042Count Prefix and Suffix Pairs I
3043Find the Length of the Longest Common Prefix
3045Count Prefix and Suffix Pairs II
3076Shortest Uncommon Substring in an Array
3093Longest Common Suffix Queries
3110Score of a String
3136Valid Word
3163String Compression III
3210Find the Encrypted String
3271Hash Divided String
3280Convert Date to Binary
3303Find the Occurrence of First Almost Equal Substring
3324Find the Sequence of Strings Appeared on the Screen
3340Check Balanced String
3407Substring Matching Pattern
3455Shortest Matching Substring
3456Find Special Substring of Length K
3491Phone Number Prefix
3498Reverse Degree of a String
3529Count Cells in Overlapping Horizontal and Vertical Substrings
3571Find the Shortest Superstring II
3582Generate Tag for Video Caption
3598Longest Common Prefix Between Adjacent Strings After Removals
3606Coupon Code Validator
3744Find Kth Character in Expanded String
3746Minimum String Length After Balanced Removals
3748Count Stable Subarrays
3758Convert Number Words to Digits
3775Reverse Words With Same Vowel Count
3777Minimum Deletions to Make Alternating Substring
3794Reverse String Prefix
3813Vowel-Consonant Score
3823Reverse Letters Then Special Characters in a String
3838Weighted Word Mapping
3856Trim Trailing Vowels
3860Unique Email Groups
3884First Matching Character From Both Ends
3931Check Adjacent Digit Differences
3941Password Strength
3986Number of Elapsed Seconds Between Two Times