r/badcode •

[deleted by user]

[deleted] — view deleted post

0 Upvotes

41 comments sorted by

View all comments

Show parent comment

4

u/EkskiuTwentyTwo i -= (i - (-1)) - i Jun 04 '19

(It's a selection sort.)

4

u/Steeven9 Jun 05 '19

I would go with miracle sort

3

u/samtonatorn Jun 05 '19

Bogosort...

2

u/EkskiuTwentyTwo i -= (i - (-1)) - i Jun 05 '19

Well, a selection sort is slow (It's O(n2) comparisions)