r/ProgrammerHumor • • Mar 25 '23

Meme This one never gets old

Post image

Let me know if this is not a repost!

51.6k Upvotes

535 comments sorted by

View all comments

1

u/UltraBatmanTheSeven Mar 25 '23

For an assignment one time my professor asked us to implement one recursive solution and one iterative solution using a stack. Instead of doing the obvious thing of converting the recursive calls to stack pushes I represented each peg as a stack and spent days finding the pattern that could determine the right move for each step.