title: how to find two sentences which have the largest number of common words?
body: <p>Given a list of sentences, find two sentences which have the largest number of common words. 
  The common words does not need locate in the same position in the sentences( order does not matter).</p>
  
  <p>Thanks !</p>
  
  <p>update:</p>
  
  <p>Does non-pairwise algorithm for this problem exist? Because pairwise is very straightforward.</p>
  
  <p>my idea is to use inverted index to store where this word appears. This need traverse every word in each sentence. And then create a n*n 2D array which is used to count how many times two sentences appear in same bucket in inverted index. </p>