Morendil comments on A thought-process testing opportunity - Less Wrong

27 [deleted] 22 April 2013 07:51PM

You are viewing a comment permalink. View the original post to see all comments and the full post content.

Comments (28)

You are viewing a single comment's thread.

Comment author: Morendil 24 April 2013 10:51:09PM *  1 point [-]

Here's another, for programmers. Do not click this link before thinking of an answer.

First, we ask how you’d find whether a number was in an array? Most people’s first answer is to iterate through the array. [...] Then we ask for another option. Again, most people will answer that you could sort and do a binary search. [...] Next comes the big question: What factors influence which approach, between a linear scan and a sort+binary search, you should pick for an unsorted array?