Apple Interview Question

Q: In an hour, write a simple C++ algorithm involving standard input and output. Provide test cases.

Interview Answer

Anonymous

Oct 12, 2015

The tests are more difficult than the program. You have to think carefully what is the right way to test such I/O program. In particular, after the test I realized I didn't really make the appropriate test that would be captured in a general way using streams.

1