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
-
morgh6818yReminds me of a cs exam I once took.
Asked to write a sorting algorithm in Haskell that would work on list of numbers.
I couldn't for the life of me figure out how to write mergesort and I really needed the points for the question.
I did however know how to compute all the permutations of a given list. I also knew how to work with randoms.
Thus was born RandomSort. The random part was actually an optimization because randomizing quicksort makes it expected to run faster.
Related Rants
How to pass tests, sooner or later
(free code camp)
undefined
tests
fcc
free code camp