No video

Heaps in 3 minutes - Intro

  Рет қаралды 158,576

Michael Sambol

Michael Sambol

Күн бұрын

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 жыл бұрын
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 ай бұрын
If you count array from 0, left = 2i + 1, right 2i + 2, parent Math.floor(i-1/2)
@skringli
@skringli 8 ай бұрын
Thank you!!! 🙏🙏
@danieltascu7020
@danieltascu7020 3 ай бұрын
thanks
@Shinn-sy6jf
@Shinn-sy6jf 6 күн бұрын
parent = Math.floor((i-1)/2)
@jeevesmcqueeves
@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
@MichaelSambol Жыл бұрын
Thank you! 👊🏼
@FaridTaba
@FaridTaba 10 ай бұрын
Came here to comment the exact same thing!! Thank you for not editing out all the pauses 🙏
@unknownman1
@unknownman1 2 жыл бұрын
please don't go away this time. I remember watching your tutorials 4 years back.
@zeeg1529
@zeeg1529 10 ай бұрын
really appreciate the pacing and mentioning heaps for memory management first to avoid confusion. great content!
@MichaelSambol
@MichaelSambol 10 ай бұрын
thank you!
@abhishekmoramganti3471
@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.3702
@jays.3702 3 ай бұрын
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 Жыл бұрын
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
@MichaelSambol Жыл бұрын
you're welcome!
@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
@ChristyTamuno
@ChristyTamuno 4 ай бұрын
Wow
@usualguy7583
@usualguy7583 7 ай бұрын
Really easy to understand and straight to the point. I appreciate the video a lot
@dameongraham4444
@dameongraham4444 2 жыл бұрын
My gosh man!! You’re amazing!! Keep it coming…🙏🏾🙏🏾
@MichaelSambol
@MichaelSambol 2 жыл бұрын
More en route!
@udayrajvadeghar8555
@udayrajvadeghar8555 Ай бұрын
Extremely helpful!! Thank you !! :)
@alliesteele6282
@alliesteele6282 Жыл бұрын
Criminally underrated, thank you!
@MichaelSambol
@MichaelSambol Жыл бұрын
haha thank you! tell your friends
@antonkomaristyy3562
@antonkomaristyy3562 2 күн бұрын
this is goated, deserves all the likes
@MichaelSambol
@MichaelSambol 2 күн бұрын
Thanks man!
@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 ай бұрын
Nice! Go crush your test 💪🏼❤️
@MarcoAurelio-sv2tk
@MarcoAurelio-sv2tk Ай бұрын
Excellent explanation!!!
@asif.haswarey
@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
@user-fk1wo2ys3b Жыл бұрын
You are a great teacher, what a talent, THANKS!!!
@MichaelSambol
@MichaelSambol Жыл бұрын
Thank you 🫡
@SirArtorias
@SirArtorias 2 жыл бұрын
Oh boy, a gift from God, tomorrow is my exam lol
@servantofthelord8147
@servantofthelord8147 Жыл бұрын
So concise. Ugghh, I love it 👍
@MichaelSambol
@MichaelSambol Жыл бұрын
💪🏼❤️
@LilJollyJoker
@LilJollyJoker 8 ай бұрын
Thank You!
@user-wy1br4le3i
@user-wy1br4le3i Ай бұрын
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 жыл бұрын
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 ай бұрын
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 Жыл бұрын
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 10 ай бұрын
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
@MichaelSambol
@MichaelSambol 2 жыл бұрын
you're welcome 😊
@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 жыл бұрын
Wow
@leonh2140
@leonh2140 Жыл бұрын
Why is the title of the video translated into german?
@MichaelSambol
@MichaelSambol Жыл бұрын
Default should be English. Is it not?
@voilin
@voilin 10 ай бұрын
no way I found a video less than 10 minutes
@noswag5773
@noswag5773 11 ай бұрын
❤❤
@MichaelSambol
@MichaelSambol 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
@MichaelSambol
@MichaelSambol Жыл бұрын
:(
Heaps in 6 minutes - Methods
5:56
Michael Sambol
Рет қаралды 72 М.
Heaps, heapsort, and priority queues - Inside code
19:01
Inside code
Рет қаралды 80 М.
王子原来是假正经#艾莎
00:39
在逃的公主
Рет қаралды 19 МЛН
The Giant sleep in the town 👹🛏️🏡
00:24
Construction Site
Рет қаралды 21 МЛН
Understanding B-Trees: The Data Structure Behind Modern Databases
12:39
10 FORBIDDEN Sorting Algorithms
9:41
Ardens
Рет қаралды 847 М.
What Is a Binary Heap?
8:45
Spanning Tree
Рет қаралды 186 М.
Stack vs Heap Memory - Simple Explanation
5:28
Alex Hyett
Рет қаралды 221 М.
I gave 127 interviews. Top 5 Algorithms they asked me.
8:36
Sahil & Sarra
Рет қаралды 644 М.
2.6.3 Heap - Heap Sort - Heapify - Priority Queues
51:08
Abdul Bari
Рет қаралды 2,1 МЛН
Most Common Concepts for Coding Interviews
6:08
NeetCode
Рет қаралды 306 М.
Why Neural Networks can learn (almost) anything
10:30
Emergent Garden
Рет қаралды 1,2 МЛН
Heap sort in 4 minutes
4:13
Michael Sambol
Рет қаралды 988 М.