82

Most moronic implementation... But atleast it uses some type of sort...

Comments
  • 20
    Well... it does what it is supposed to.

    And there's a whole 0.000002204% chance it's gonna get it sorted on each iteration. 😂

    Best case is O(1).
  • 15
    Why not a while loop? It would be faster and use less memory..
  • 4
    @YousifMansour Lol, this is what happens when you try fixing bad code.
  • 14
    @YousifMansour yea.. cause memory is clearly the issue here :P
  • 6
    good ol bogosort
  • 1
    @linuxbrother11 true. The random sort does guarantee that it eventually will output a sorted string (depends on the implementation and how random the thing really is).
  • 1
    There were people in my Intro To CS class in Uni who would do shit like this.
    They were never seen or heard from again after the fourth week.
  • 5
    This is like saying, "Hey guys! Glue some wood together until it looks like a house!"
Add Comment