Recursion
Functions that call themselves on smaller pieces of the problem.
| Status | Challenge | Topics | Level | Accepted | Save |
|---|---|---|---|---|---|
| 1.Climbing StairsCount the ways to climb n stairs taking one or two at a time. | Dynamic programmingMathRecursion | Easy | – | ||
| 2.Depth of a TreeCount the levels of a binary tree, from the root to its deepest leaf. | TreesRecursion | Easy | – | ||
| 3.Invert a TreeMirror a binary tree, swapping every node's left and right children. | TreesRecursion | Easy | – | ||
| 4.Generate ParenthesesList every balanced string of n pairs of parentheses. | RecursionStrings | Medium | – | ||
| 5.Valid Search TreeCheck whether a binary tree keeps the search tree order everywhere. | TreesRecursion | Medium | – | ||
| 6.N QueensCount the ways to place n queens on an n × n board with none attacking another. | Recursion | Hard | – | ||
| 7.Pattern MatchingMatch text against a pattern with . and * wildcards. | StringsDynamic programmingRecursion | Hard | – | ||
| 8.Best Path Sum in a TreeFind the path through a binary tree whose values add up to the most. | TreesRecursionDynamic programming | Hard | – |