How to represent a Binary Heap in Java? | Animation

Поделиться
HTML-код
  • Опубликовано: 7 ноя 2024

Комментарии • 14

  • @itsdineshvaryani
    @itsdineshvaryani  3 года назад +1

    Please *Like* , *Comment* , *Share* , *Subscribe* and *Click Bell* 🔔🔔🔔 Icon for More Updates. To get *Data Structures and Algorithms* complete course for free please follow this link - ruclips.net/p/PL6Zs6LgrJj3tDXv8a_elC6eT_4R5gfX4d

  • @shubhamagarwal1941
    @shubhamagarwal1941 2 года назад +2

    Best series for DS & Algo. I am also 10 yrs java exp guy. Was looking for DS & Algo free course over RUclips with java implementation and found this. Hats Off To You Man...Excellent Work. GOD BLESS YOU :)

  • @prakritilodhi7743
    @prakritilodhi7743 Месяц назад

    Nice explanation 😊

  • @anuragpandey796
    @anuragpandey796 2 года назад +3

    What if 1 is empty in the above max heap, according to definition left side should always be filled, so if we take out 1 we will fulfill the definition but one place in array will be empty.

    • @itsdineshvaryani
      @itsdineshvaryani  2 года назад +1

      you can also fill 0 index .... you just need to change formulas for parent and child accordingly !!!

  • @ABHISHEKAnand-ut2fq
    @ABHISHEKAnand-ut2fq 3 года назад +3

    thank you sir for your effort... really helpful!!!

    • @itsdineshvaryani
      @itsdineshvaryani  3 года назад +1

      In case you like this video ... Please like, share and subscribe so that channel grows and it allows me to post more ... Thanks !!!

  • @VikasSingh-wp9mv
    @VikasSingh-wp9mv 2 года назад +1

    your videos contains great sir

  • @arijitmohapatra147
    @arijitmohapatra147 3 года назад +1

    Why we r storing elements from index 1??

    • @itsdineshvaryani
      @itsdineshvaryani  3 года назад +1

      It makes calculation of both child indexes easy and also if given child index we can calculate easily where parent index lies... You can start heap from 0 index as well but google child and parent index calculation correspnding to 0 index ....

    • @arijitmohapatra147
      @arijitmohapatra147 3 года назад +1

      @@itsdineshvaryani ok sir, thanks for replying always 🙏🙏
      Only RUclipsr who always replies within a second🔥🎉❤️

  • @ekansh6267
    @ekansh6267 Год назад

    👌👌👍