Interesting file processing question
Anonymous User
3494
  • You are given a single very large file.
  • The file contains millions of lines. Each line is delimited by slash-n.
  • You need to count the number of characters in each line and print it.
  • Given n hosts, you have to do this in the smallest amount of time possible. The file is accessible from each host (think of it as a network file system).

The file object supports the following operations only

  • getSize()

  • read(int offset, int length)

How would you do it?

Comments (7)