+ 1
Stack limit exceed error
when i entered 1 disk, i got 'stack limit exceed error'. i cant understand why? https://code.sololearn.com/WsjY2RPMWzYA/?ref=app
3 Respuestas
+ 1
check function moveQueue. diskNum goes lower 0
put console.log(diskNum+ " "+ from +" "+to +" "+ middle) in the begin of this function
+ 1
When diskNum = 1, statement 'diskNum === 1' in the function moveQueue return false.
And now I know why. :)
=== (strictly equal), that's the problem.
Thank you, Yaroslav.
0
no problem