2078 7

BIT201 ยท 2078 ยท 5 marks

Define recursion. Explain Tower of Hanoi algorithm in detail.

Define recursion. Explain Tower of Hanoi algorithm in detail. [5]

Data Structures and AlgorithmsChapter 5: Recursion and Advanced TechniquesTower of Hanoi algorithm and tracing

Recursion is a programming technique in which a function calls itself directly or indirectly to solve a problem. A recursive function solves a problem by breaking it down into smaller subproblems of the same type until it reaches a base case (terminating condition) that can be solved directly wit...