title: How can i get the top n keys of std::map based on their values?
body: <p>How can i get the top n keys of std::map based on their values?
  Is there a way that i can get a list of say for example the top 10 keys with the biggest value as their values?<br>
  Suppose we have a map similar to this :</p>
  
  <pre><code>mymap["key1"]= 10;
  mymap["key2"]= 3;
  mymap["key3"]= 230;
  mymap["key4"]= 15;
  mymap["key5"]= 1;
  mymap["key6"]= 66;
  mymap["key7"]= 10; 
  </code></pre>
  
  <p>And i only want to have a list of top 10 keys which has a bigger value compared to the other.
  for example the top 4 for our mymap is </p>
  
  <pre><code>key3
  key6
  key4 
  key1
  key10 
  </code></pre>
  
  <p><strong>note:</strong><br>
  the values are not unique, actually they are the number of occurrences of each key. and i want to get a list of most occurred keys   </p>
  
  <p><strong>note 2:</strong><br>
  if map is not a good candidate and you want to suggest anything, please do it according to the c++11 ,i cant use boost at the time.</p>
  
  <p><strong>note3:</strong><br>
  in case of using <code>std::unordered_multimap&lt;int,wstring&gt;</code> do i have any other choices?</p>