Why learn recursionΒΆ
- Because it makes the code easy to write (compared to iterative) whenevert a given problem can be broken down into a similar sub-problem.
- Because it is heavily sed in Data Structures like Trees, Graphs etc.
- It is heavily used in techniques like
Divide and Conquer
,Greedy
,Dynamic programming
.