grokking-algorithms/chapter4
2024-02-06 21:53:17 +00:00
..
binary.py clean up repo. 2024-02-06 21:53:17 +00:00
maximum.py remove highest 2024-01-08 09:38:37 +00:00
quicksort.py cleanup quicksort 2024-01-08 15:46:21 +00:00
README.md clean up repo. 2024-02-06 21:53:17 +00:00
summation.py add summation 2024-01-07 21:19:42 +00:00

Recursion

Recursive functions must have both:

  • one or more base cases
  • a recursive case

The base cases are required to ensure the recursion stops when meeting a condition

The recursive case adds functions onto the call stack and completes each one top down.

Note. Quicksort should be implemented using a random pivot to ensure average runtimes.