Hey guys im experimenting on void recursive function,
and i dont understand why the ouput of this program is
{1 2 1 3 1 2 1 }
because the next number to 3 is 2 and then 1
so the output should be {1 2 3 2 1}
please help! i dont understand ;
Step through it using a debugger. it's fairly easy to see what's going on then.
but it's essentially when x is 3 you are calling hanoi(x-1) twice in succession.