569
you are viewing a single comment's thread
view the rest of the comments
[-] unmagical@lemmy.ml 2 points 2 days ago

You're right, how can we simplify that into a usable insite?

Prioritize erecting "neat" towers then moving the largest disk not placed in the previous step?

[-] SpaceNoodle@lemmy.world 3 points 2 days ago

For each tower of size N, move tower (N - 1) to the non-target position, then move the base to the target position, then move the previously moved tower of size (N - 1) to the target position.

this post was submitted on 01 Jun 2026
569 points (99.0% liked)

Programmer Humor

31647 readers
837 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 3 years ago
MODERATORS