Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 236
alhid Avatar asked Mar 12 '26 22:03

alhid


1 Answers

  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.

like image 178
Fred Foo Avatar answered Mar 14 '26 21:03

Fred Foo



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!