3 ms·
Apparently Google SREs spend a lot of time watching the clock.
by itronitron 7y ago
Apparently Google SREs spend a lot of time watching the clock.
- fzeroracer 7y agoThe irony of the clock brain teaser is that it operates on two assumptions. One being that the person asked has experience with analog clocks (which, given that it's 2020 has become less relevant) and the second being that said clock behaves according to standard specifications. If the clock was instead a jump hour clock for example, then that tosses the trickery out of the window. Which is really what that brain teaser is about; testing that your cultural understanding of how an analog clock functions is correct.
- jrockway 7y agoI think getting the correct answer in code is easier than solving the "trick question" about 3:15. If I were the interviewer here, I would make sure the candidate states their assumptions and that the code they wrote follows those assumptions. You can make the hour hand stick right at the number for the entire hour, or you can have it smoothly sweep as the minutes (or seconds) increase. I would not care and consider both to be reasonable interpretations (but I've never seen a clock that sticks at the hours; it is harder to implement in hardware). I honestly wouldn't even ask this question because it's too simple. It's two divisions, a subtraction, and then a modulo 360. It is awkward when your interview question only takes 5 minutes and you have to awkwardly fill 55 minutes with follow up questions ("and how would you test that?").