How to Code a Priority Queue Using Binary Heap? (with CODE EXAMPLE)
Вставка
- Опубліковано 5 жов 2024
- There are several ways you can implement a Priority Queue. However, the most efficient way is to use a Binary Heap as its underlying implementation.
This video teaches you the concept of a Priority Queue and a Binary Heap. It also shows how you can implement this Binary Heap-based Priority Queue in code!
Amazing explanation. Thank you.
Thanks, I need to assemble an app that does visualisation of a priority queue in Android Studio-Kotlin. This helped me a lot. Now I just need to figure out to implement in Kotlin :D
great video thanks!
Why is index 0 not used in the heap array?
i don't know, can you show me why??
@@minhct2511 because you cannot do arithmetic operations on 0 when using multiplication? Or somthing to that effect