Skip to content

Commit c56bfe9

Browse files
add about.md
1 parent d4b91b3 commit c56bfe9

File tree

1 file changed

+9
-0
lines changed
  • exercises/concept/pizza-order/.docs

1 file changed

+9
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
### About Recursion
2+
3+
Recursion is a programming technique where a function calls itself to solve smaller instances of the same problem. It’s a powerful tool for breaking down problems that can be divided into smaller, similar sub-problems. However, recursion can quickly run into issues such as **Memory Allocation Errors** or **Maximum Call Stack Size Exceeded** if not handled carefully.
4+
5+
In JavaScript, one important limitation is the **lack of Tail-Call Optimization (TCO)**. Tail-call optimization allows the language engine to reuse the stack frame for recursive calls when they occur at the end of a function. Unfortunately, JavaScript does not support TCO, which means that deeply nested recursive calls can lead to a stack overflow.
6+
7+
### Interesting Facts:
8+
- Recursion is widely used in problems such as tree traversal, factorial calculation, and Fibonacci sequences.
9+
- JavaScript does not optimize tail calls, unlike other languages such as Scheme or Haskell.

0 commit comments

Comments
 (0)