alhid
alhid

Reputation: 61

priority queue based on 2-3-4 tree structure

Does anybody have any information about priority queues based on the 2-4 tree structure? I have been searching all day.. Any references from anyone who knows would be really appreciated.. Thank you.

Upvotes: 3

Views: 1089

Answers (1)

Fred Foo
Fred Foo

Reputation: 363577

  1. Implement 2-3-4 trees, allowing duplicate keys.
  2. Use them as priority queues by storing priorities as keys and implementing retrieve+delete minimum (or maximum) element. The minimum can be found by following the lefmost child pointer until it becomes null.

See also tree sort.

Upvotes: 1

Related Questions