Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
lucaslsr738yWell... 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). -
@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).
-
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. -
This is like saying, "Hey guys! Glue some wood together until it looks like a house!"
Most moronic implementation... But atleast it uses some type of sort...
undefined