rudra101's blog

By rudra101, history, 9 years ago, In English

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?

  • Vote: I like it
  • -29
  • Vote: I do not like it

»
9 years ago, # |
  Vote: I like it +1 Vote: I do not like it

Could you define dumb? I thought that is inefficient, not dumb.

  • »
    »
    9 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    As I mentioned, I read the post from Quora. I used 'dumb' to maintain a commonality with the original post.

    I think I got a lot of downvotes because of using that word. In reality, I never meant it to be derogatory. I posted it as fun and was hoping to find algorithms which are so non-optimal that they cannot be used in most of the real life situations.

    I am sorry if I offended you and will be careful of what I post from now on.

»
9 years ago, # |
  Vote: I like it +34 Vote: I do not like it

This one may be good contender

  • »
    »
    9 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Thanks for the great insight. Will work towards getting better.

»
9 years ago, # |
Rev. 3   Vote: I like it +1 Vote: I do not like it

Actually, this is the fastest sorting algorithm according to it's best case performance. Since random shuffle is liniar and there's always a chance that the first shuffle with sort the array — we have linear complexity :)