mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2026-11-29 18:37:18 +08:00
* refactor: clean to roadmap content * refactor: move shared helpers into scripts/lib
9 lines
868 B
Markdown
9 lines
868 B
Markdown
# Recursion
|
|
|
|
Recursion is a programming technique where a function calls itself within its own definition. This creates a loop-like behavior, but instead of using explicit loops (like `for` or `while`), the function breaks down a problem into smaller, self-similar subproblems until it reaches a base case, which stops the recursion and returns a value. The results from each recursive call are then combined to produce the final solution.
|
|
|
|
Visit the following resources to learn more:
|
|
|
|
- [@article@How to Use Recursion & Memoization in Ruby](https://www.rubyguides.com/2015/08/ruby-recursion-and-memoization/)
|
|
- [@article@Simple Recursion in Practice with Ruby](https://codesignal.com/learn/courses/easy-interview-coding-practice-in-ruby/lessons/simple-recursion-in-practice-with-ruby)
|
|
- [@video@Ruby Recursion Explained!](https://www.youtube.com/watch?v=5JyJWdOP8PM) |