News for hackers. Stuff that matters.
Re:Sorting Algorithm Cheat Sheet by adrianmonk on Friday April 26, 2019 @10:08PM (#19763328)
I think the intention is that the job will relate to the running time of other algorithms and that sorting things is a toy problem you can use to test whether they know anything about that subject in general.

There may be better ways to assess that, though. For example, you could ask them to give one or two examples each of algorithms that are O(1), O(log N), O(N), O(N log N), and O(N^2), and O(something worse than N^2).

Re:Sorting Algorithm Cheat Sheet by mjcohen on Saturday April 27, 2019 @12:07AM (#19763716)
Behold, the worstsort:

Generate all permutations of the data. Stop when one of them is in order.

O(n*n!).