Classic instance of what opponents of coding interviews (which does not include me) object to. The engineneer was looking for me to spot the recursive trick for a string conversion problem, which was by no means obvious, and was by no means obviously correct even after he gave up on me and pointed it out. He ended the programming session after I raised questions about correctness, even though there was time left, without giving me a chance to implement the algorithm he’d suggested. He said that I had shown that I knew how to code it, but obviously meant the opposite: I got a rejection email soon after the interview. (I don’t disagree with the rejection: Apple seemed to be looking for a CS major to output code quickly; I’m a math major who has only written a test harness from scratch three times in my career.)
Most troubling for a testing position, while I was writing doctests† to make sure I had understood his specification, he told me there wasn’t enough time to write tests, or to document my iterative algorithm: I should just start typing code. Somewhat less troublingly (at least for me as an applicant, if not as an Apple customer), the problem would probably have been a test of memory rather than coding ability for a CS major, since it seems to be a topic which would have been covered in class.
___
† doctest is a very cool Python module, which examines the examples you put into a function’s documentation string, and complains if it does not produce the output you specified.