4 ms·
The problem here, as with most interview problems, is that it is wholly dissociated from its context; memory contraints, disk I/O, and file size are non-trivial
by daviddever23box 4y ago
The problem here, as with most interview problems, is that it is wholly dissociated from its context; memory contraints, disk I/O, and file size are non-trivial considerations. Shame on people for stare-at-one's-shoes thinking.
- javajosh 4y agoPeople can make reasonable assumptions for interview problems. In this case, assume the code runs on a modern developer laptop, with an SSD and lots of RAM, using some modern OS, is a fine assumption. If someone asks you a physics question about a car being dropped into the ocean, generally you don't have to worry about the make and model of the car.
- LastTrain 4y agoBut if you read the article, you would see that you'd run afoul with this interviewer doing that, because he has utterly convinced himself that I/O is no longer the bottleneck and coming to the same conclusion is your unspecified task in the interview.