3 ms·
> For recursion you have to keep in brain many things while you call yourself. This is extremely hard it depends on your problem domain. Recursion makes some t
by chii 4y ago
> For recursion you have to keep in brain many things while you call yourself. This is extremely hard
it depends on your problem domain. Recursion makes some things easier - much easier than iteration. Try solving tower of hanoi without using recursion and see how hard it is: https://www.geeksforgeeks.org/iterative-tower-of-hanoi/ https://www.geeksforgeeks.org/iterative-tower-of-hanoi/
Or try writing a merge sort algorithm without using recursion.