Question: This is Js. I missed some code here, I don't know what i missed Challenge: Solve Hanoi recursively Report a problem) Recursively move disks from

This is Js. I missed some code here, I don't know what i missed
Challenge: Solve Hanoi recursively Report a problem) Recursively move disks from the spare peg to the target peg. Hint What's this? / recursive case: Make a recursive function call to move the disks from the spare peg back on top of the bottom disk, i.e. move (numDisks the spare peg to the target peg. - 1) disks from solveHanoi(: Hm, do all of your assertions pass? 806-var solveHano1 = function(numDisks, fromPeg, toPeg) 807 808if (numDisks0 809 810 811 812 813 814 815 816; 817 var fromPeg-"A" 818 var toPeg-"". 819 var sparePeg hanoi.getSparePeg(fromPeg, toPeg); 820 821 solveHanoi(5, "A", "B"); { /base case: no disks to move return true; // recursive case: var sparePeg hanoi.getSparePeg(fromPeg, toPeg); solveHanoi(numDisks-1, fromPeg, sparePeg); hanoi.moveDisk(fromPeg, toPeg); 822 Program.assertEqualChanoi.isSolved"B"t; 823 Further calls to the moveDisk function will be blocked. C Restart Step 4/5 Undo Start over Next Step!r Restart to be able to cal1 the function again
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
