Challenge: Recursive Towers of Hanoi
Apply what you’ve learned about recursion in the coding exercises in this lesson.
We'll cover the following
Problem statement
Given 3 Pegs—A
, B
, and C
—and n
Disks, all on peg A, move all disks to Peg C
.
void move(int n, char sp, char ap, char ep);
Create a free account to view this lesson.
By signing up, you agree to Educative's Terms of Service and Privacy Policy