3 ms·
It's important to understand the question and communicate that understanding before you start coding. For relatively junior positions (L3-L4 at Google), I would
by mgraczyk 5y ago
It's important to understand the question and communicate that understanding before you start coding. For relatively junior positions (L3-L4 at Google), I would expect that a candidate would do roughly what was described in the linked post.
However, it's really important not to behave in a way that is overly formulaic or comes across as being heavily "coached". If your interviewer is engaged and competent, coaching like this will entice the interviewer to mix things up and ask questions that force you to break out of the coached pattern. If the interviewer isn't as good, it's more likely they will just give you a lukewarm score and say that you were coached.
For example, if a candidate said something like "can strings be multicharacter?", I'd probably ask why that would matter. In the example question, it doesn't matter at all because we're just looking for equality of members (could be arrays of any type and the question would be the same), and would be a weird thing to seek clarification on. Maybe a better example would be if the candidate asked if there's an upper bound on the size of the input array. In real programming, that's not the sort of thing that usually matters, so I'd expect the candidate to explain why that matters in this case (maybe they have a O(n^3) algorithm in mind that would be untenable if the input can be large).
I've done a few hundred interviews, over 100 at Google.