Skip to content

Instantly share code, notes, and snippets.

@linstantnoodles
Created March 19, 2013 02:21
Show Gist options
  • Save linstantnoodles/5193227 to your computer and use it in GitHub Desktop.
Save linstantnoodles/5193227 to your computer and use it in GitHub Desktop.
hanoi recursive
function move(n, f, d, t) {
if (n > 0) {
move(n - 1, f, t, d);
d.push(f.pop());
move(n - 1, t, d, f);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment