4 ms·
I don't agree with that at all. Thinking for 10 minutes is not sufficient. There's two insights and neither are obvious until you get them. Assuming candidates
by bugsy 16y ago
I don't agree with that at all. Thinking for 10 minutes is not sufficient. There's two insights and neither are obvious until you get them. Assuming candidates will get them is like assuming quick sort will occur to them if they've never seen it before.
- cageface 16y agoThe minute you actually sat down and thought about it you got it, as did I, as would any of the better programmers I've worked with in my career. Walk halfway into an algorithm and it's clear. I wouldn't expect the average code schlepper to get this but that's the entire point. This ad suggests to me that's not what they're after.
- bugsy 16y agoEnded up being 5 lines of code in C. (Cue: reactions from others that it's a one liner in Haskell, or that it's obviously simple and easy since the solution was so short.) (The five lines didn't include the data, but a sixth very long line takes care of that if really felt to be part of the count.)