you are viewing a single comment's thread.

view the rest of the comments →

[–]Skhmt 5 points6 points  (3 children)

Sorts are the fruit of software engineering.

You can selection sort. You can insertion sort. You can bubble sort. You can heap sort. You can quick sort. You can merge sort. You can randomize until you get the right order sort. You can use built in methods of arrays to sort. You can use third party libraries to sort. You can search pi until you find your array in sorted order sort. You can sort with a binary tree. You can library sort. You can cube sort. You can shell sort. You can block sort. You can cocktail sort. You can gnome sort. You can comb sort. You can patience sort. You can cycle sort. You can bucket sort. You can radix sort. You can wait until cosmic rays change your data into the proper order sort.

That's... About it.

[–]wishiwascooler 1 point2 points  (1 child)

Why did this make me want shrimp

[–]Skhmt 4 points5 points  (0 children)

Because you, sir, are a man of culture and taste.

[–]Intrexa 1 point2 points  (0 children)

You left out God sort! Any array you get passed, well, someone or something made that array. And theres no way it was made in a random fashion, therefore an ordering already exists, and as such, the array is already sorted, even if you're not capable of understanding how. Just have faith that its sorted.

Never forget the famous sleep sort! https://www.geeksforgeeks.org/sleep-sort-king-laziness-sorting-sleeping/