I hereby claim:
- I am not-napoleon on github.
- I am not_napoleon (https://keybase.io/not_napoleon) on keybase.
- I have a public key whose fingerprint is 7F1A 41CC 5A1C 7F38 013A 7391 EB00 C0E7 F50F D863
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| #!/bin/sh | |
| # Alot of these configs have been taken from the various places | |
| # on the web, most from here | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # Set the colours you can use | |
| black='\033[0;30m' | |
| white='\033[0;37m' | |
| red='\033[0;31m' |
| """ | |
| Iterative towers of Hanoi solution. | |
| This is based on the idea that essentially, the towers problem is a binary | |
| counter, with the disk that gets moved being equal to the bit that would be | |
| set on any iteration of the counter. | |
| The solution exploits a few other mathematical properties of the problem: | |
| To solve an N disk towers of Hanoi requires (2^n)-1 moves (easy to prove |