title: Longest substring where every character appear even number of times (possibly zero)
body: <blockquote>
    <p>Suppose we have a string <code>s</code>. We want to find the length of the longest substring of <code>s</code> such that every character in the substring appears even number of times (possible zero).<br>
    WC Time: <code>O(nlgn)</code>. WC space: <code>O(n)</code></p>
  </blockquote>
  
  <p>First, it's obvious that the substring must be of an even length. Second, I'm familiar with the sliding window method where we anchor some <code>right</code> index and look for the left-most index to match your criterion. I tried to apply this idea here but couldn't really formulate it.</p>
  
  <p>Also, it seems to me like a priority queue could come in handy (since the <code>O(nlgn)</code> requirement is sort of hinting it)</p>
  
  <p>I'd be glad for help!</p>