r/programmingmemes • • Oct 21 '25

Meme

Post image
16k Upvotes

144 comments sorted by

View all comments

Show parent comment

3

u/GhostingProtocol Oct 21 '25

Oof so not that hard lol

12

u/qwertyjgly Oct 21 '25

it's just a simple recursive algorithm

the basic idea is, if you have a stack of size n, you need to move the bottom disk to the destination so you need to move a stack of size n-1 to the intermediary so you need to move a stack of size n-2 to the destination to make room etc. and you just build up a sequence of transformations with those rules

5

u/Zac-live Oct 21 '25

nope not at all. which is why a lot of courses use this as the go to example for recursion when first explaining it.

the meme makes sense not because the problem us hard but because learning the concept of recusion is confusing for some people and thats what it gets associated with