4 ms·
You could make the problem harder with "you are given a stream of n - 1 integers". N could then be any number, unbound by available memory. That makes the prob
by williamdclt 1y ago
You could make the problem harder with "you are given a stream of n - 1 integers". N could then be any number, unbound by available memory.
That makes the problem harder which makes it more interesting, a lot of the solutions wouldn't work anymore (this isn't necessarily a good interview question though)
- Arnavion 1y agoEven with the original formulation, the array doesn't have to fit in available memory. mmap exists.
- cluckindan 1y agoYou are given a magnetic tape containing a list of n - 1 integers… :-)