|
|
|
|
|
by boring_twenties
1559 days ago
|
|
Not FizzBuzz, and not me personally, but from someone I worked with and I have 0 reason to believe is lying: After a few disappointing responses to better questions, interviewer decides to give a "freebie" and asks for a function that determines whether an integer is odd or even. Candidate produces something that loops from 0 to the provided integer, incrementing two separate counters, then comparing them at the end. Interviewer manages to stammer out something like "are you sure there isn't a more efficient way to solve this?" Guy furrows his brow for a few minutes more, then a light bulb of sorts goes on, and he declares "Of course! ..." "... I only need one counter!" |
|