Which of the following algorithm cannot be designed without recursion

2025

Which of the following algorithm cannot be designed without recursion

  1. A.

    Tower of Hanoi

  2. B.

    Fibonacci Series

  3. C.

    Tree Traversal

  4. 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.

Explore the full course: Cocubes Preparation