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!

КОМЕНТАРІ • 6

  • @kritikadhawan6299
    @kritikadhawan6299 Рік тому

    Amazing explanation. Thank you.

  • @nikaks1
    @nikaks1 2 роки тому

    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

  • @shelorck5118
    @shelorck5118 Рік тому

    great video thanks!

  • @varunsudarsan2936
    @varunsudarsan2936 3 роки тому

    Why is index 0 not used in the heap array?

    • @minhct2511
      @minhct2511 2 роки тому

      i don't know, can you show me why??

    • @billy36h
      @billy36h 2 роки тому

      @@minhct2511 because you cannot do arithmetic operations on 0 when using multiplication? Or somthing to that effect