Home > Back-end >  Why PriorityQueue array is used to implement?
Why PriorityQueue array is used to implement?

Time:02-05

Array to realize the pile will produce a lot of space, isn't it, why don't you like about child node structure to achieve?

CodePudding user response:

To see the definition of the heap, apparently because heap is full binary tree, so there is no space, and structure than use an array to store space more, because the structure of the internal control node pointer,
  • Related