title: What is data structure based for set
body: <p>In C++, map is based on a black-red tree, thus, insert/delete function will cost O(logn), and hash_map is based on a hash. </p>
  
  <p>But I'm wandering that what data structure is set based?  </p>
  
  <p>Set is sorted as map does, so, is set also based on a black-red tree?  </p>
  
  <p>How its key and value stored in that tree?  </p>
  
  <p>And if so, what's data structure for unorder_set? Thanks!</p>