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
@MichaelSambol2 жыл бұрын
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-stressmusic43210 ай бұрын
If you count array from 0, left = 2i + 1, right 2i + 2, parent Math.floor(i-1/2)
@skringli8 ай бұрын
Thank you!!! 🙏🙏
@danieltascu70203 ай бұрын
thanks
@Shinn-sy6jf6 күн бұрын
parent = Math.floor((i-1)/2)
@jeevesmcqueeves Жыл бұрын
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 Жыл бұрын
Thank you! 👊🏼
@FaridTaba10 ай бұрын
Came here to comment the exact same thing!! Thank you for not editing out all the pauses 🙏
@unknownman12 жыл бұрын
please don't go away this time. I remember watching your tutorials 4 years back.
@zeeg152910 ай бұрын
really appreciate the pacing and mentioning heaps for memory management first to avoid confusion. great content!
@MichaelSambol10 ай бұрын
thank you!
@abhishekmoramganti3471 Жыл бұрын
You are probably one of the best educators out there man! These types of videos make these concepts way less intimidating to approach.
@jays.37023 ай бұрын
This is such a fire way to teach coding concepts. Keep it up man
@jasonleng24902 күн бұрын
Your channel deserves way more subscriptions.
@kamylamarinho4868 Жыл бұрын
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!!
@MichaelSambol Жыл бұрын
you're welcome!
@rongitmukherjee2 ай бұрын
Best explanation I've found till now
@eriksoto85125 ай бұрын
what an insanely good video to find while studying and writing notes for a final
@ChristyTamuno4 ай бұрын
Wow
@usualguy75837 ай бұрын
Really easy to understand and straight to the point. I appreciate the video a lot
@dameongraham44442 жыл бұрын
My gosh man!! You’re amazing!! Keep it coming…🙏🏾🙏🏾
@MichaelSambol2 жыл бұрын
More en route!
@udayrajvadeghar8555Ай бұрын
Extremely helpful!! Thank you !! :)
@alliesteele6282 Жыл бұрын
Criminally underrated, thank you!
@MichaelSambol Жыл бұрын
haha thank you! tell your friends
@antonkomaristyy35622 күн бұрын
this is goated, deserves all the likes
@MichaelSambol2 күн бұрын
Thanks man!
@paulinaanna59 ай бұрын
i spent 2 hours in a lecture to hear about this concept. I understood your 2 mins explanation better
@mohammadahmedragab8373 ай бұрын
easy to understand ,consice and in the same time detailed and I like your explanation :")
@meepmoop425 ай бұрын
studying for my data structures final and ur videos are so incredibly helpful :]
@MichaelSambol5 ай бұрын
Nice! Go crush your test 💪🏼❤️
@MarcoAurelio-sv2tkАй бұрын
Excellent explanation!!!
@asif.haswarey Жыл бұрын
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 Жыл бұрын
You are a great teacher, what a talent, THANKS!!!
@MichaelSambol Жыл бұрын
Thank you 🫡
@SirArtorias2 жыл бұрын
Oh boy, a gift from God, tomorrow is my exam lol
@servantofthelord8147 Жыл бұрын
So concise. Ugghh, I love it 👍
@MichaelSambol Жыл бұрын
💪🏼❤️
@LilJollyJoker8 ай бұрын
Thank You!
@user-wy1br4le3iАй бұрын
The sound here is scary, almost had a panic attack.
@macolulu7 ай бұрын
This is so great
@anshikagaur21564 ай бұрын
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?
@fernandofa20012 жыл бұрын
Your videos are fantastic! But how do you have so few views for all the subscribers you have?
@MichaelSambol2 жыл бұрын
thank you! help me spread the word :)
@fernandofa20012 жыл бұрын
@@MichaelSambol sure thing pal, keep it up!
@NickWinters3 ай бұрын
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.
@ironmonkey19905 ай бұрын
Thank you!
@NoName-rq6bg5 ай бұрын
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 Жыл бұрын
Is a max-heap the same as just a heap?
@renderscott Жыл бұрын
I think a "regular" heap is a min-heap
@zakyoung23742 жыл бұрын
Appreciate you man
@narenbabu629 Жыл бұрын
What is the intution behind naming the Heap data structure. What is called a heap in Heap data structure?
@happilyevernever428910 ай бұрын
heap: an untidy collection of objects placed haphazardly on top of each other.
@CptColCool Жыл бұрын
2:19 Whoa, what is this dark magic 😲
@colin91122 жыл бұрын
well done
@JvMapote2 жыл бұрын
Thank you soo much
@MichaelSambol2 жыл бұрын
you're welcome 😊
@D3ebK2 жыл бұрын
Next stop 60k!
@xPorkchops007x Жыл бұрын
0:30 I thought that was a complete binary tree that is nearly full, not nearly complete
@goodhuman12 жыл бұрын
Wow
@leonh2140 Жыл бұрын
Why is the title of the video translated into german?
@MichaelSambol Жыл бұрын
Default should be English. Is it not?
@voilin10 ай бұрын
no way I found a video less than 10 minutes
@noswag577311 ай бұрын
❤❤
@MichaelSambol11 ай бұрын
💪🏼❤️
@ecmrn5 ай бұрын
He's cute and he's smart.
@user-ri3yl7sd5l10 ай бұрын
hi
@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