title: Finding ALL Non Repeating characters in a given string
body: <p>So I was given the question:</p>
  
  <p>Find ALL of the non-repeating characters in a given string;</p>
  
  <p>After doing some Google searching it was clear to me that finding the first non repeating character was pretty common. I found many examples of how to do that, but I have not really found anything on how to find ALL of the non repeating characters instead of just the first one.</p>
  
  <p>my example code so far is:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;unordered_map&gt;
  
  using namespace std;
  
  char findAllNonRepeating(const string&amp; s) {
  
      unordered_map&lt;char, int&gt; m;
  
      for (unsigned i = 0; i &lt; s.length(); ++i) {
          char c = tolower(s[i]);
  
          if (m.find(c) == m.end())
              m[c] = 1;
          else
              ++m[c];
      }
  
      auto best = m.begin();
  
      for (auto it = m.begin(); it != m.end(); ++it)
          if (it-&gt;second &lt;= best-&gt;second)
              best = it;
  
      return (best-&gt;first);
  }
  
  
  int main()
  {
      cout &lt;&lt; findAllNonRepeating("dontknowwhattochangetofindallnonrepeatingcharacters") &lt;&lt; endl;
  }
  </code></pre>
  
  <p>I am not sure what I need to change or add to have this find all of the non repeating characters. </p>
  
  <p>k, f, p, s should be the non repeating characters in this string.</p>
  
  <p>Any hints or ideas are greatly appreciated!</p>