Recursion
Define the answer in terms of the same problem on a smaller input, with a base case that stops the descent. The tell is a definition that repeats itself, as in Pow(x, n). Halving the input each time, as that one does, turns a linear loop into logarithmic time.
9 problems · 3 to practice in an AI round
| # | Problem | Difficulty | Video | AI round |
|---|---|---|---|---|
| 1 | Pow(x, n) | Medium | — | |
| 2 | Permutation Sequence | Hard | — | AI round |
| 3 | Power of Three | Easy | — | |
| 4 | Count Good Numbers | Medium | — | AI round |
| 5 | Find Kth Bit in Nth Binary String | Medium | — | AI round |
| 6 | Elimination Game | Medium | — | |
| 7 | Finding 3-Digit Even Numbers | Easy | — | |
| 8 | Special Binary String | Hard | — | |
| 9 | Unique 3-Digit Even Numbers | Easy | — |
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 Permutation Sequence in an AI roundYour first AI round is free.