Блог пользователя rudra101

Автор rudra101, история, 9 лет назад, По-английски

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?

  • Проголосовать: нравится
  • -29
  • Проголосовать: не нравится

»
9 лет назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится

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

  • »
    »
    9 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    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 лет назад, # |
  Проголосовать: нравится +34 Проголосовать: не нравится

This one may be good contender

»
9 лет назад, # |
Rev. 3   Проголосовать: нравится +1 Проголосовать: не нравится

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 :)