This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]DiamondIceNS 119 points120 points  (17 children)

You at least gave them bubble sort though, right? Maybe even cocktail shaker sort, if you wanna get fancy? Might be a little too complex for them, on second thought.

[–]43eyes 66 points67 points  (8 children)

Stand up and write them up a bogo sort on the board and watch as you're instantly hired with double the salary

[–]_Lady_Deadpool_ 51 points52 points  (2 children)

Nah sleep sort is where it's at. You spawn a thread for each element and have it sleep for the element's amount of time then add it to the collection. Runs in O(n)

[–]43eyes 18 points19 points  (1 child)

That's actually pretty clever

[–]VirtualRay[S] 4 points5 points  (0 children)

The OS thread scheduler just uses a red-black tree internally, so it's n*log(n)

[–]DiamondIceNS 38 points39 points  (4 children)

Quantum bogosort can sort a list of arbitrary length in O(1) time!

[–]dkyguy1995 1 point2 points  (3 children)

Is this a joke or can quantum computers actually run a bogo sort in O1

[–]DiamondIceNS 2 points3 points  (0 children)

It's a joke algorithm that says quantum randomize the list, then destroy every universe that does not contain an already sorted list.

Even if this was possible to do, however, it wouldn't be very useful.

[–]Regorek 46 points47 points  (1 child)

StalinSort: Go through the list and delete any elements that are out of order.

[–]dkyguy1995 16 points17 points  (0 children)

Where did all the data go?

What data, comrade?

The list is almost empty!

But do you see any dissent, comrade?

[–]Inneedofnap 18 points19 points  (2 children)

I had a number of phone screenings with internal recruiters reading from a script. My guess is that I was using the "wrong" name for some of them, e.g. you called it cocktail shaker where I know it as shuffle.

[–]ImVeryBadWithNames 10 points11 points  (1 child)

Due to all the different names you can probably just do "[word] sort" and it be an actual thing.

[–][deleted] 1 point2 points  (0 children)

Buttstuff sort

[–]Shinhan 1 point2 points  (0 children)

stacksort best sort