Don't ask them questions about the problem. Just assume ;)

So, always ask in the interview why you're solving the problem, or better yet, what problem you're trying to solve. If you get a stupidly simple question like this, something is up. There more to the question and they want to see how you approach the problem. Do you just go barreling in guns blazing, or do you consider what the system is trying to accomplish? Do you think like an engineer, or do you just regurgitate CS 1 algorithms?

Plus, this is a great opportunity to buy some time.

This is a perfectly reasonable solution if, say, you need to keep retrieving the minimum from a list with new information constantly coming into it. Sorting it first could be immensely beneficial if the speed of that retrieval is the critical operation and updating the list is secondary. Does it need to be done once, or 1000 times a second? How big is the list? What does that O(n) operation actually cost?

/r/ProgrammerHumor Thread Link - i.redd.it