Last active
June 8, 2021 22:00
-
-
Save mcsee/4804592d6fa65f37cf91d7d676acc3d2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
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