3 ms·
What falls into the riddle vs. "acceptable" role? In my mind, it's perfectly valid to ask, for instance, "Given a binary search tree, write a program to return
by mjmahone17 14y ago
What falls into the riddle vs. "acceptable" role? In my mind, it's perfectly valid to ask, for instance, "Given a binary search tree, write a program to return all elements between a low and high." or "Write a program to return whether or not a given string matches a regular expression." Are these "riddles," as espoused by the article? Sort of: they do take some element of an "aha!" moment to solve, whereas the "recommended" questions were mainly just domain-knowledge questions. But if you solve these problems using convoluted coding techniques, then I as an interviewer would be really worried that you'd muddy our codebase unnecessarily, and if you can't see how to solve them, I may discover that you have a problem thinking recursively, or logicing through complex issues. Or, I may find that you tend to dive into a problem before thinking about it and designing your solution. All of these seem fairly relevant to any job, and I've actually turned down employers that asked me too many "domain-knowledge" questions and not enough "how do you think about things" questions, because I don't want to be somewhere where I'm just expected to "know" the answer.