4 ms·
It really depends on the type of programming job you are interviewing for, but for all of the jobs I've had I'd expect a candidate to be able to do this with or
by jstelly 14y ago
It really depends on the type of programming job you are interviewing for, but for all of the jobs I've had I'd expect a candidate to be able to do this with or without using a mod operator. I've asked people similarly simple programming problems; I like the approach. I don't like requiring leaps of intuition or analysis as a filter like this though. So problems should be straightforward. You are checking for fundamental coding and problem solving in an interview like this.