logoalt Hacker News

apricottoday at 1:18 AM3 repliesview on HN

In addition to the points listed, it gives the algorithm nerds the opportunity to show their overqualification by whipping out the O(n) median algorithm and proving that it works in linear time.


Replies

salamandermantoday at 1:24 AM

I almost tanked an interview, and luckily turned it around, when the interviewer had never heard of QuickSelect and thought I was insane when I started writing it.

BobbyTables2today at 3:52 AM

Or do a bucket sort on 32bit integers for worst case O(n) time, not O(n^2)

Only half kidding…

Using just 16GB RAM for a task is practically resource-constrained programming these days…

show 1 reply
kccqzytoday at 2:29 AM

Or it could just be someone who uses C++ instead of Python as their interview language. The std::nth_element is in the standard library.