what is the difference between recursive solution and iterative solution ?
sumaira manzoor hussain khan
Recursive solution is using of recursion (same function inside in the function). Iteration on the other hand is using looping structures. Iteration simplifies the code. Not sure about the computing time. To know that, we need to run same program with two of them and analyse the results like hits in the code and cpu cycles.