Dumbest code ever

Правка en1, от 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?

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский rudra101 2015-06-06 14:34:10 463 Initial revision (published)