Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

The Best Sorting Algorithm

Name: Anonymous 2009-09-07 21:49

In this thread we will discuss sorting algorithms and vote for our favorite one.

I will update the stats every postIndex % 25 posts.  

May the best #sort win!

- Bubble Sort
- Insertion Sort
- Selection Sort
- Merge Sort
- Quick Sort
- Heap Sort
- Shell Sort
- Bucket Sort
- Radix Sort


Vote for one of these or any sort you like. I'll add new sorts to the list when I update stats.

Name: Anonymous 2009-09-08 16:53


from random import shuffle
 
def bogo_sort(seq):
    count = 0
    while not all(x <= y for x, y in zip(seq, seq[1:])):
        shuffle(seq)
        count+=1
    print seq,'in',count



>>> bogo_sort([1,6,9,3,2,87])
[1, 2, 3, 6, 9, 87] in 900
>>> bogo_sort([1,6,9,3,2,87])
[1, 2, 3, 6, 9, 87] in 172
[b]>>> bogo_sort([1,6,9,3,2,87])
[1, 2, 3, 6, 9, 87] in 2[/b]
>>> bogo_sort([1,6,9,3,2,87])
[1, 2, 3, 6, 9, 87] in 868


IT'S LIKE THE BEST SORTING ALGORITHM EVAR

Name: Anonymous 2009-09-08 17:01

>>81
Who cares about run counts? Complexity analysis or GTFO.

Name: Anonymous 2009-09-08 19:53

Bucket sort. Because I feel bad for it.

Name: Anonymous 2009-09-08 19:58

BUTTSORT

Name: Anonymous 2009-09-08 20:08

Selection sort

Name: Anonymous 2009-09-08 20:56

Bogosort.

Name: Anonymous 2009-09-08 23:42

Bogosort. Look at all the retarded humor attempts that all received only one vote. OP should have limited the whole "adding sorts" thing.

Name: Anonymous 2009-09-08 23:49

Butterfly sort

Name: Anonymous 2009-09-08 23:49

Quicksort. Works best in C/C++, my favorite languages.

Name: Anonymous 2009-09-09 0:16

Insertion sort. The only one I can ever remember.

Name: Anonymous 2009-09-09 0:20

Merge sort.

Name: Anonymous 2009-09-09 0:20

Whats with people only knowing insertion sort? kinda random.

Name: Anonymous 2009-09-09 0:25

Shell sort

Name: Anonymous 2009-09-09 0:57

Is there a difference between a search and a sort? I mean.. searches sort also right?

Name: Anonymous 2009-09-09 1:01

>>95
-100/10

Name: Anonymous 2009-09-09 1:06

>>95
a search is all about locating an element within an array. they do not necessarily have to sort the array (a simple linear search searches from one end of the array to the other, for instance.)

a sort re-orders elements in an array according to some comparison function.

Name: Anonymous 2009-09-09 1:17

>>97
YHBT. But you are a nice guy so I wont hold it against you.

Name: Anonymous 2009-09-09 1:22

carp

Name: Anonymous 2009-09-09 1:57

hi

Name: Anonymous 2009-09-09 1:58

HASKELL SORT

Name: Anonymous 2009-09-09 2:01

>>102
U MENA HASKAL?

Name: Anonymous 2009-09-09 2:53

>>100-103
same person

Name: Anonymous 2009-09-09 3:11

>>104
some person

Name: Anonymous 2009-09-09 5:27

>>88
Bogosort. Look at all the retarded humor attempts that all received only one vote. OP should have limited the whole "adding sorts" thing.
OP has an agenda, and non-faggotry would fail to promote it.

Name: Anonymous 2009-09-09 8:39

I'm torn between Bogosort and Fibonacci Butt Sort.

Name: Anonymous 2009-09-09 8:53

( ≖‿≖) sort.

Name: Anonymous 2009-09-09 8:53

What the fuck, FBS doesn't sort anything.

Name: Anonymous 2009-09-09 10:11

>>106
What agenda? Promoting BUTTSORTS ?

Name: Anonymous 2009-09-09 10:23

>>111
The queer agenda.

Name: Anonymous 2009-09-09 10:43

FBS

Name: Anonymous 2009-09-09 11:45

JEWS Sort

Name: Anonymous 2009-09-09 11:55

Anal rampage.

Name: Anonymous 2009-09-09 12:25

>>112
that one that someone posted on 4-ch? about fucking kids and stuff?

Name: Anonymous 2009-09-09 13:41

>>114
It's kind of difficult to sort out the ashes.

Name: Anonymous 2009-09-09 14:21

Name: Anonymous 2009-09-09 15:26

>>118
Time complexity = O(ass)

Name: Anonymous 2009-09-09 15:52

God sort. O(0) time complexity for the win.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List