4 ms·
Binary, Hanoi and Sierpinski (Part 1)
- peter_d_sherman 6y agoThere's a beautiful use of recursion here, to solve Towers of Hanoi. It can sort of be summarized as "do the smallest, minimal bit of work here (in the function body), then call ("the recursive function"/"ourself") recursively to do all of the rest of it; that is, the "heavy lifting"... (Which is, interestingly enough, related to Chicken-And-Egg problems, although this video doesn't make that connection.) Also: Binary, Hanoi, and Sierpinski, part 2 https://www.youtube.com/watch?v=bdMfjfT0lKk https://www.youtube.com/watch?v=bdMfjfT0lKk