Advanced data structures and strings
Tackle harder string and counting problems with tools like rolling hashes, string matching and merge sort or tree-based counting. Look for repeated substrings or counting pairs across an array, as in Count of Smaller Numbers After Self. These tools beat the brute-force quadratic scan.
13 problems · 1 with a video · 3 to practice in an AI round
| # | Problem | Difficulty | Video | AI round |
|---|---|---|---|---|
| 1 | Count of Smaller Numbers After Self | Hard | — | |
| 2 | Find the Index of the First Occurrence in a String | Easy | — | AI round |
| 3 | Reverse Pairs | Hard | — | |
| 4 | Maximum Length of Repeated Subarray | Medium | AI round | |
| 5 | Repeated Substring Pattern | Easy | — | AI round |
| 6 | Range Sum Query - Mutable | Medium | — | |
| 7 | Rotate String | Easy | — | |
| 8 | Shortest Palindrome | Hard | — | |
| 9 | Repeated DNA Sequences | Medium | — | |
| 10 | Repeated String Match | Medium | — | |
| 11 | Count of Range Sum | Hard | — | |
| 12 | Longest Happy Prefix | Hard | — | |
| 13 | Block Placement Queries | Hard | — |
Sort by what interviews ask
Sign in to see how many companies ask each problem, sort all 500 by it or by likes, and tick off what you solve.
Practice in an AI round
Three of these are AI rounds: 30 minutes, an AI agent beside your code, then a scored report.
Practice Find the Index of the First Occurrence in a String in an AI roundYour first AI round is free.