Java: How does Recursion change my view on repetition, and why do I need to be concerned about Optimality? As usual, Please comment on two of your classmates posts.
Recursion is something when you call your functions again and again until it reaches to a termination condition. Recursion can be considered as better approach than iteration. Because it can reduce time complexity of your code. In tree traversals recursion is better than iteration. Because in bigger programs we have to take care of optimality. Optimality means high performance in less time. Suppose you have a program which is giving output after long period of time say 10 second. Is it good? no ! If you have alternative option which could be used to reduce this time then you should go with that feature.
Time complexity and performance always matters in organisational work.
DON'T FORGET TO HIT LIKE.
THANKS BY HEART.
Get Answers For Free
Most questions answered within 1 hours.