title: How to match 2 lists most effectively (fast)?
body: <p>I have 2 <code>lists&lt;string&gt;</code> of items, source and target. The items in the source list will have 0 to n matches in the target list, but there will not be duplicate matches.</p>
  
  <p>Considering both lists are sorted, how would you do the matching most effectively in terms of performance.</p>
  
  <p>Example:</p>
  
  <pre><code>source = {"1", "2", "A", "B", ...}
  target = {"1 - new music", "1 / classic", "1 | pop", "2 edit", "2 no edit", "A - sing", "B (listen)", ...}
  </code></pre>
  
  <p>Basically the match is simple prefix match, but say you have a method called <code>MatchName</code>. You can use a new function if you are gonna do more optimized searches. <code>NameMatch</code> just compares 2 strings and returns a bool.</p>
  
  <p>In the end source[0] will have source[0].Matches to contain target[0, 1 and 2] in this case.</p>