Heaps 2 Add Remove

Поділитися
Вставка
  • Опубліковано 16 січ 2025

КОМЕНТАРІ • 8

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

    So glad I found this. Dr. Edwards explains these so well. Best I've seen on the internet so far.

  • @augustuscaeser8939
    @augustuscaeser8939 6 років тому +3

    love this man. This man and his amazing glass board has made my class so much easier to understand

  • @Banthor
    @Banthor 6 років тому +15

    What if you wanted to remove a particular node? What would the process be then? For example, if I wanted to remove the node with the value of 17.

    • @yagzyalcntas553
      @yagzyalcntas553 6 років тому +4

      exactly my question, he spoke as nothing other than root can be removed...

    • @yagzyalcntas553
      @yagzyalcntas553 6 років тому

      @@mutoso wow dude thnx! where did you find this??

    • @1Eagler
      @1Eagler 5 років тому

      @@mutoso why not always replacing it with A[lastIndex]?

    • @drcl7429
      @drcl7429 Рік тому +1

      For those who are wondering: It seems that heaps have a specific use case and that mostly is related to priority queues. This means that taking the top off the heap is dequeuing the item with the min/max priority. Other data structures should be used if you need to do other things. You can remove from anywhere in the heap if you want but its probably not very efficient.

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

    5:29 is for max heap only right?