142k views
10 votes
What are the differences between linear algorithm and iterative algorithm

User InTry
by
3.3k points

1 Answer

9 votes

Answer:

For example Tower of Hannoi algorithm is made easy by recursion while iterations are widely used, efficient and popular. Recursive vs Iterative Algorithms: Approach: In recursive approach, the function calls itself until the condition is met, whereas, in iterative approach, a function repeats until the condition fails.

User Len Holgate
by
3.8k points