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

Advanced data structures and strings problems
#ProblemDifficultyVideoAI round
1Count of Smaller Numbers After SelfHard—
2Find the Index of the First Occurrence in a StringEasy—AI round
3Reverse PairsHard—
4Maximum Length of Repeated SubarrayMediumAI round
5Repeated Substring PatternEasy—AI round
6Range Sum Query - MutableMedium—
7Rotate StringEasy—
8Shortest PalindromeHard—
9Repeated DNA SequencesMedium—
10Repeated String MatchMedium—
11Count of Range SumHard—
12Longest Happy PrefixHard—
13Block Placement QueriesHard—

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 round