title: Find longest subsequence s of String in a dictionary
body: <p>Find the longest subsequence s of a String such as "abccdde"
  and given a dictionary {"ab","add","aced"}
  . the result of above example is "add"</p>
  
  <p>I was asked in an interview, I gave an answer using trie tree and worst case is O(n*m)
  ,and n is length of s
  , m is length of dictionary. 
  But my average cost should be very low. I fail the interview because the interviewer thought my solution was not the best one. Does anyone have a better idea?</p>