Friday, January 28, 2022

What to do if you get a question you've already seen in a coding interview

The common advice you'll see is "Tell the interviewer so you can get a new question"

I disagree.

You should take every advantage you can get. The whole point of studying ahead of time is to prepare yourself for the inevitable interview question, if you've seen it before you are likely in a really good place to answer it well.

My take on what to do if you've seen a question before

* Don't get overly excited, if you let out an audible "YES I know this one", the interviewer may give you a different problem.

* A lot of the time you think you've seen a problem before but you really haven't. When you get overly confident and then realize you haven't seen it, it looks really bad. Don't introduce that opportunity to get hit

* If an interviewer asks you "Have you seen this one before?" you should say, "I don't think so!". Why? Because it's the truth, you probably haven't. A lot of the times you've seen a similar problem, one small tweak can result in a very different solution. You should be cautious!

* You want to be sure you walk your interviewer through your thinking even if you know the right solution out of the gate. Spend time analyzing the problem, really quickly coming up with a brute force solution, and then showing how you can optimize it to the real solution. This will show a clear line of thinking which is what the interviewer is looking for. As long as you have structure in how you solve interview problems you shouldn't have an issue. Here was my structure: https://bit.ly/3rabN2v

Tldr; I firmly believe you shouldn't throw away any advantage you have



from Hacker News https://bit.ly/3HcheDT

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.