Facebook || Phone Screening || Unexpected files API question
Anonymous User
438
Add two arbitrary large integers stored in two separate files and write the answer to the output file. Numbers are stored in binary representation in the little endian byte order.

Input:
/tmp/input-file-1
/tmp/input-file-2

Output:
/tmp/output-file

While this is a common variant of the Add Two numbers problem, I was unable to solve it properly since I didn't remember Java File APIs. While the interviewer did give me a hint after some time about which class to use, I didn't remember the method signatures for reading and writing streams.

Comments (2)