Algorithms

Recursion

How recursive functions work, which sorting algorithms use recursion and why some coding rules ban it.

Which Sorting Algorithms Use Recursion?

Merge sort and quicksort are the best-known recursive sorts, and Timsort avoids deep recursion. Bubble, insertion and heapsort usually use loops.

4 min read

Why Is Recursion Banned by NASA?

The idea that NASA banned recursion comes from a 2006 JPL coding guideline for safety-critical code. It restricts recursion so the code can be analyzed.

2 min read

Related topics

More in algorithms