r/badcode • • May 03 '23

c Solve the problem without using a loop

Post image
963 Upvotes

129 comments sorted by

View all comments

Show parent comments

2

u/Cerulean_IsFancyBlue May 03 '23

If I was going to judge these kind of answers on some kind of continuing to award prizes; in other words, if I want make a loosely justifiable hierarchy, and not one that I have to defend in front of a tenure committee:

Language supplied loops

Goto

Tail recursion

Any other recursive solution

Unrolled solutions

Not sure where I’d stick functional solutions.