Practice Questions
Here is a curated list of practice questions to test your understanding of strings.
Try to solve these on your own before looking at the solutions! Each problem builds on the concepts from the Strings section. Start with Easy problems to build confidence, then work your way up.
Easy
| Problem | Technique | Status |
|---|---|---|
| Reverse a String | Two Pointers | Available |
| Valid Palindrome | Two Pointers | Available |
| Valid Anagram | Character Frequency | Available |
| Longest Common Prefix | Vertical Scanning | Available |
| Count and Say | String Building | Available |
Medium
| Problem | Technique | Status |
|---|---|---|
| String to Integer (atoi) | Parsing / State Machine | Available |
| Longest Palindromic Substring | Expand Around Center | Available |
| Longest Substring Without Repeating Characters | Sliding Window | Available |
More Practice (Coming Soon)
| Problem | Technique | Status |
|---|---|---|
| Group Anagrams | Hash Map + Sort | Coming Soon |
| Minimum Window Substring | Sliding Window | Coming Soon |
| Longest Repeating Character Replacement | Sliding Window | Coming Soon |
| Encode and Decode Strings | String Manipulation | Coming Soon |
| Palindromic Substrings (Count) | DP / Expand Around Center | Coming Soon |
| Zigzag Conversion | Simulation | Coming Soon |
| String Compression | Two Pointers | Coming Soon |
| Implement strStr() / Find the Index of First Occurrence | KMP / Rabin-Karp | Coming Soon |