Dumbest code ever

Revision en1, by rudra101, 2015-06-06 14:34:10

I recently read this Quora post about Bogosort which tries to sort a list using the following algorithm:

  1. Put the elements of the list in a random order.
  2. If the list is sorted, finish. Otherwise go to Step 1.

It has an average running time equal to O((n+1)!). And, it may run forever.

Can someone share more algorithms which became famous due to their dumbness?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English rudra101 2015-06-06 14:34:10 463 Initial revision (published)