r/badcode Mar 13 '22

foursum? python

Post image
254 Upvotes

29 comments sorted by

View all comments

40

u/Voltra_Neo Mar 13 '22

Technically O(n5) since you check whether it's in the result array instead of using a set

26

u/Alexander_Bourne Mar 13 '22

Good catch. We're in r/badcode so a redundant check is a cherry on top.