title: Time complexity of a Priority Queue in C++
body: <p>Creating a heap takes <code>O(n)</code> time while inserting into a heap (or priority queue) takes <code>O(log(n))</code> time.</p>
  <p><strong>Taking n inputs and inserting them into the priority queue, what would be the time complexity of the operation?</strong>  O(n) or O(n*log(n)).</p>
  <p>Also, the same result would hold in case of emptying the entire heap too (i.e. n deletions), right?</p>