title: What are the differences between heap and red-black tree?
body: <p>We know that heaps and red-black tree both have these properties:</p>
  
  <ol>
  <li>worst-case cost for searching is lgN;</li>
  <li>worst-case cost for insertion is lgN.</li>
  </ol>
  
  <p>So, since the implementation and operation of red-black trees is difficult, why don't we just use heaps instead of red-black trees? I am confused.</p>