Which of the following algorithm cannot be designed without recursion
2025
Which of the following algorithm cannot be designed without recursion
- A.
Tower of Hanoi
- B.
Fibonacci Series
- C.
Tree Traversal
- D.
None of the above
Attempted by 205 students.
Show answer & explanation
Correct answer: D
Answer : D --> NONE OF THE ABOVE
Explanation
Every problem which can be solved using recursion can also be solved using iterations.
Although problems like Tower of Hanoi, Fibonacci Series, and Tree Traversal are commonly taught using recursion, none of them strictly require it.
Tower of Hanoi can be solved using an iterative approach.
Fibonacci Series can be generated using loops (iteration).
Tree Traversal (like inorder, preorder, postorder) can also be implemented using stacks instead of recursion. Even BFS (Breadth-First Search) uses a queue and is inherently iterative, while DFS (Depth-First Search) can be implemented using an explicit stack instead of recursion.
Therefore, all of these algorithms can be designed without recursion, so the correct answer is None of the above.