previous | start | next

Answers

  1. A priority queue is appropriate because we want to get the important events first, even if they have been inserted later.
  2. Yes, but a binary search tree isn't almost filled, so there may be holes in the array. We could indicate the missing nodes with null elements.


previous | start | next