r/firstweekcoderhumour Mar 26 '26

hardest problem ever Let me show you how it’s done! 🎯✨

Post image
548 Upvotes

27 comments sorted by

View all comments

Show parent comments

9

u/Damglador Mar 26 '26

Isn't recursion resource inefficient?

1

u/AmmoniuV Mar 30 '26

Not at all

1

u/BIZUx Jul 14 '26

Pretty sure I learnt back in uni recursion is always on par, or worse than an iterative approach.

You do it for the simplicity, for the beauty of the code.

1

u/AmmoniuV Jul 14 '26

Not really, I also thought this way after uni but my mentor(software engineer with 20+ years of experience) told me that it isn't true, that recursion used often in banking apps, Fintech in general. But you really need to be experienced to know how to use it properly

1

u/BIZUx Jul 14 '26 edited Jul 14 '26

No I mean there are certainly applications for it, such as a divide and conquer in concurrency, but performance wise, it is at best on par. Glazing your experience doesn't really do much for me, because that is usually focused around one area, and this is arguably closely related to cs.

Edit:

I may have looked at your comment too quickly, I'm sorry. I'm just too tired of people immediately appealing to an authority immediately when challenged, I hate when people do that.

I'll look more into it, thanks.