Heaps in 3 minutes - Intro

Поделиться
HTML-код
  • Опубликовано: 29 авг 2024
  • Introduction to heaps in 3 minutes.
    Code: github.com/msa...
    Sources:
    1. Introduction To Algorithms, Third Edition (CLRS) [www.amazon.com...]
    2. www.quora.com/...
    3. stackoverflow....
    LinkedIn: / michael-sambol

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

  • @MichaelSambol
    @MichaelSambol  2 года назад +22

    In the discussion on height, it's worth noting that nearly complete binary trees are balanced and thus have a height of O(logn). Regular binary trees may become unbalanced, at which point this would no longer apply.

  • @de-stressmusic432
    @de-stressmusic432 10 месяцев назад +62

    If you count array from 0, left = 2i + 1, right 2i + 2, parent Math.floor(i-1/2)

  • @jeevesmcqueeves
    @jeevesmcqueeves Год назад +38

    Instantly subscribed because it's a breath of fresh air to have a slow-paced (yet short and concise) explanation of a concept. I feel like I have time to actually understand what is being explained.

    • @MichaelSambol
      @MichaelSambol  Год назад +3

      Thank you! 👊🏼

    • @FaridTaba
      @FaridTaba 10 месяцев назад +2

      Came here to comment the exact same thing!! Thank you for not editing out all the pauses 🙏

  • @unknownman1
    @unknownman1 2 года назад +45

    please don't go away this time. I remember watching your tutorials 4 years back.

  • @zeeg1529
    @zeeg1529 10 месяцев назад +7

    really appreciate the pacing and mentioning heaps for memory management first to avoid confusion. great content!

  • @abhishekmoramganti3471
    @abhishekmoramganti3471 Год назад +6

    You are probably one of the best educators out there man! These types of videos make these concepts way less intimidating to approach.

  • @jays.3702
    @jays.3702 3 месяца назад +2

    This is such a fire way to teach coding concepts. Keep it up man

  • @jasonleng2490
    @jasonleng2490 2 дня назад

    Your channel deserves way more subscriptions.

  • @kamylamarinho4868
    @kamylamarinho4868 Год назад +2

    Hey man, I wanted to thank you, you taught me in a simple and efficient way the subject that my teacher has been teaching for 2 months!!

  • @rongitmukherjee
    @rongitmukherjee 2 месяца назад

    Best explanation I've found till now

  • @eriksoto8512
    @eriksoto8512 5 месяцев назад

    what an insanely good video to find while studying and writing notes for a final

  • @usualguy7583
    @usualguy7583 7 месяцев назад

    Really easy to understand and straight to the point. I appreciate the video a lot

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

    My gosh man!! You’re amazing!! Keep it coming…🙏🏾🙏🏾

  • @udayrajvadeghar8555
    @udayrajvadeghar8555 Месяц назад +1

    Extremely helpful!! Thank you !! :)

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

    Criminally underrated, thank you!

  • @antonkomaristyy3562
    @antonkomaristyy3562 2 дня назад

    this is goated, deserves all the likes

  • @paulinaanna5
    @paulinaanna5 9 месяцев назад

    i spent 2 hours in a lecture to hear about this concept. I understood your 2 mins explanation better

  • @mohammadahmedragab837
    @mohammadahmedragab837 3 месяца назад

    easy to understand ,consice and in the same time detailed and I like your explanation :")

  • @meepmoop42
    @meepmoop42 5 месяцев назад

    studying for my data structures final and ur videos are so incredibly helpful :]

    • @MichaelSambol
      @MichaelSambol  5 месяцев назад +1

      Nice! Go crush your test 💪🏼❤️

  • @MarcoAurelio-sv2tk
    @MarcoAurelio-sv2tk Месяц назад

    Excellent explanation!!!

  • @asif.haswarey
    @asif.haswarey Год назад +2

    First off, nice video!
    2:18 : Would help visually for you to show the indices (indicated by i in the formulas) in small font next to each of the nodes. For example:
    Node 21 : i = 0
    Node 17 : i = 1
    Node 14 : i = 2
    Node 12 : i = 3
    Node 8 : i = 4
    Node 1 : i = 5
    Lastly, using the light-green and cyan-blue colors might be difficult to clearly distinguish for color impaired viewers. But then there's the problem with yellow and light red.
    Tritanomaly : Blue/Green, Yellow/Red,
    Tritanopia : Blue/Green, Purple/Red, Yellow/Pink
    O boy! Nevermind!

  • @user-fk1wo2ys3b
    @user-fk1wo2ys3b Год назад

    You are a great teacher, what a talent, THANKS!!!

  • @SirArtorias
    @SirArtorias 2 года назад

    Oh boy, a gift from God, tomorrow is my exam lol

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

    So concise. Ugghh, I love it 👍

  • @LilJollyJoker
    @LilJollyJoker 8 месяцев назад +1

    Thank You!

  • @user-wy1br4le3i
    @user-wy1br4le3i Месяц назад +1

    The sound here is scary, almost had a panic attack.

  • @macolulu
    @macolulu 7 месяцев назад

    This is so great

  • @anshikagaur2156
    @anshikagaur2156 4 месяца назад

    hey , for left u said its 2*i and the answer comes out index 6 but while considering 2n+1 for left , answer comes out index 7 , why?

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

    Your videos are fantastic! But how do you have so few views for all the subscribers you have?

    • @MichaelSambol
      @MichaelSambol  2 года назад

      thank you!
      help me spread the word :)

    • @fernandofa2001
      @fernandofa2001 2 года назад

      @@MichaelSambol sure thing pal, keep it up!

  • @NickWinters
    @NickWinters 3 месяца назад

    Why are heaps sometimes called nearly complete binary trees? How is that relevant? I learned that heaps are sorted binary trees. It shouldn't matter if they are nearly or fully complete, or drastically incomplete then. And it's not like all nearly complete binary trees are heaps. I don't understand.

  • @ironmonkey1990
    @ironmonkey1990 5 месяцев назад

    Thank you!

  • @NoName-rq6bg
    @NoName-rq6bg 5 месяцев назад +1

    The MLS clearly has the beat Logos🔥 they look kinda like city or state logos. Logos from the other leagues look too much like school logos

  • @mrmansir3734
    @mrmansir3734 Год назад +1

    Is a max-heap the same as just a heap?

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

      I think a "regular" heap is a min-heap

  • @zakyoung2374
    @zakyoung2374 2 года назад

    Appreciate you man

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

    What is the intution behind naming the Heap data structure.
    What is called a heap in Heap data structure?

    • @happilyevernever4289
      @happilyevernever4289 11 месяцев назад

      heap: an untidy collection of objects placed haphazardly on top of each other.

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

    2:19 Whoa, what is this dark magic 😲

  • @colin9112
    @colin9112 2 года назад

    well done

  • @JvMapote
    @JvMapote 2 года назад

    Thank you soo much

  • @D3ebK
    @D3ebK 2 года назад

    Next stop 60k!

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

    0:30 I thought that was a complete binary tree that is nearly full, not nearly complete

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

    Wow

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

    Why is the title of the video translated into german?

  • @voilin
    @voilin 10 месяцев назад

    no way I found a video less than 10 minutes

  • @noswag5773
    @noswag5773 11 месяцев назад

    ❤❤

  • @ecmrn
    @ecmrn 5 месяцев назад

    He's cute and he's smart.

  • @user-ri3yl7sd5l
    @user-ri3yl7sd5l 10 месяцев назад

    hi

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

    Currently really angry at him so I thought I‘m going to study a bit and learn about heap.
    Yeah I‘m now more angry