Programming Question

Question: Given an input file with four billion non-negative integers, provide an algorithm to generate an integer that is not contains in the file. Assume you have 1 GB of memory available for this task. Follow Up: What if you have only 10 MB of memory? Assume that all the values are distinct and we now have no more than one billion non-negative integers.

From: Cracking the Coding Interview [McDowell]

Subject: Sorting and Searching

Load Another Question


Select a Subject