title: Parallel top ten algorithm for distributed data
body: <p>This is an interview question. Suppose there are a few computers and each computer keeps a very large log file of visited URLs. Find the <em>top ten</em> most visited URLs.</p>
  
  <p>For example: Suppose there are only 3 computers and we need the <em>top two</em> most visited URLs.</p>
  
  <pre>
  Computer A: url1, url2, url1, url3
  Computer B: url4, url2, url1, url1
  Computer C: url3, url4, url1, url3
  
  url1 appears 5 times in all logs
  url2 2
  url3 3
  url4 2 
  
  So the answer is url1, url3
  </pre> 
  
  <p>The log files are too large to fit in RAM and copy them by network. As I understand, it is important also to make the computation parallel and use all given computers.  </p>
  
  <p>How would you solve it?</p>