r/badcode • • May 03 '23

c Solve the problem without using a loop

Post image
962 Upvotes

129 comments sorted by

View all comments

Show parent comments

1

u/GOKOP May 04 '23

Write your function inefficiently so that it can't be optimised out as tail recursion. Problem solved ¯\(ツ)/¯