Recursion
Express a solution in terms of a smaller instance of the same problem, with a defined base case that terminates the calls.
Express a solution in terms of a smaller instance of the same problem, with a defined base case that terminates the calls.
Each recursive call receives a strictly smaller input, guaranteeing termination when the base case is eventually reached.
The call stack implicitly tracks all deferred work without an explicit auxiliary structure — useful when the recursion tree is the structure.
The base case anchors the computation so every branch terminates with a valid result that unwinds correctly.