HW01 with memoization

added memoization to the hanoiN function.
Could probably be tidier, but this is at least *much* faster.