▲ | ur-whale 2 days ago | |
In what way is that question trivia? I believe you under-estimate what a good interviewer is trying to do with questions such as these: Either you've seen the trick before and you get an opportunity to show the interviewer that you're an honest person by telling him you have. Huge plus and the interview can move on to other topics. Either you haven't and you can demonstrate to the interviewer your analytical skills by dissecting the problem step by step and understanding what the code actually does and how. Bonus if you can see the potential aliasing problem when used to swap two variables. Not a trivia question at all. | ||
▲ | commandlinefan a day ago | parent | next [-] | |
I knew a guy who would ask the binary search question in interviews (i.e. "you have an array of sorted values, what's the fastest way to find if an element is in the array?"). I always felt like this was an unfair question to ask somebody as well - it doesn't seem like something you'd be able to come up with on your own if you hadn't seen it _in an interview situation_. OTOH it's a quick way to screen people who actually did a CS degree. | ||
▲ | shmerl a day ago | parent | prev | next [-] | |
Imagine asking to prove a relatively difficult theorem. That's a similar type of question and it's a waste of time during an interview. Once you know the proof (know the algorithm), the idea might seem trivial, but coming up with such idea (inventing the algorithm) took people possibly a very long time in the first place. You shouldn't expect it to be possible during the course of the interview for those who don't know it already, it makes no sense to expect that. At best, the question will check if someone memorized such stuff. But I don't see a lot of value in that. | ||
▲ | snozolli a day ago | parent | prev [-] | |
It has no connection to modern software engineering. It's a clever and irrelevant trick for 99.999% of programming jobs out there. Stop asking these asinine questions and ask questions relevant to real-world software engineering. Software engineers are their own worst enemies. |