Amazon Interview Question

How to find a string in a large file storage

Interview Answers

Anonymous

Nov 27, 2015

Not all problems are found by writing more code!

Anonymous

Feb 3, 2015

The "block B" stuff won't work. If block B contains half of the string, then you skipped to the next block, you will just miss it.

Anonymous

Sep 24, 2013

set a block B of characters larger than the string to find and a bit smaller than the Memory available. Now read B characters, search string, if found return true, if not, load next B characters and so on.