title: Longest common prefix for n string
body: <p>Given n string of max length m. How can we find the longest common prefix shared by at least two strings among them?</p>
  
  <p>Example: ['flower', 'flow', 'hello', 'fleet']</p>
  
  <p>Answer: fl</p>
  
  <p>I was thinking of building a Trie for all the string and then checking the deepest node (satisfies longest) that branches out to two/more substrings (satisfies commonality). This takes O(n*m) time and space. Is there a better way to do this</p>