Skip to content

Instantly share code, notes, and snippets.

@mcsee
Last active Jun 8, 2021
Embed
What would you like to do?
<?
function moveDiscs($n, $src, $dst, $aux) {
if ($n > 1)
moveDiscs($n - 1, $src, $aux, $dst);
print("Move from " + $src + " to " + $dst);
if ($n > 0)
moveDiscs($n - 1, $aux, $dst, $src);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment