2.6.3 Heap - Heap Sort - Heapify - Priority Queues

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 ก.พ. 2025

ความคิดเห็น • 2K

  • @collinsotuoma3353
    @collinsotuoma3353 5 ปีที่แล้ว +600

    At 22nd minutes and I paused to come, check the comments because I feel lots of happiness and I was sure many people would be feeling the same. Looking at the comments I was right. This guy is great. Shout out from Kenya

    • @hackerhaddi
      @hackerhaddi 4 ปีที่แล้ว +4

      i've done the same lol

    • @ashitsingh136
      @ashitsingh136 4 ปีที่แล้ว +3

      Bro you feel me!

    • @this_rishi
      @this_rishi 4 ปีที่แล้ว +5

      i did the same at 30 minute mark!

    • @blossomwithcurls
      @blossomwithcurls 4 ปีที่แล้ว

      He is the best teacher !!

    • @mohitpandey5190
      @mohitpandey5190 4 ปีที่แล้ว +2

      For me it was 31st minute :)

  • @andreixperience
    @andreixperience 5 ปีที่แล้ว +6358

    So basically we're all going to university to get our degree but we learn all the stuff from youtube tutorials.

    • @princedesperado7787
      @princedesperado7787 5 ปีที่แล้ว +261

      Duuuude . This is like the harsh truth. I would have given up long ago without these Online Teachers.

    • @sonam9611
      @sonam9611 5 ปีที่แล้ว +26

      So truuuu......!!!

    • @ManojKumar-id8gj
      @ManojKumar-id8gj 5 ปีที่แล้ว +16

      Prince Desperado so true 😂

    • @ManojKumar-id8gj
      @ManojKumar-id8gj 5 ปีที่แล้ว +11

      Prince Desperado yeah

    • @yannickfumukani4798
      @yannickfumukani4798 5 ปีที่แล้ว +14

      Very true sadly!

  • @PrateekKumarAgrawal
    @PrateekKumarAgrawal 5 ปีที่แล้ว +3082

    2:34 - Representation of a Binary Tree using Array
    14:15 - Heap ( Max & Min )
    16:21 - Insert in Heap (Max)
    22:18 - Delete in a Heap (Max)
    30:12 - Heapsort
    41:37 - Heapify
    47:00 - Priority Queues

  • @ethanbvr4227
    @ethanbvr4227 3 ปีที่แล้ว +949

    As someone who has failed data structures twice, I owe this semester's success to you. Not only this, but all of your videos have helped me more than you could ever imagine. Thank you so much; you are a God send for all struggling CS students out there!

    • @gytiskau1865
      @gytiskau1865 3 ปีที่แล้ว +98

      3 year old video and he still likes the comments. Absolute mad lad :D

    • @newsanalysis4831
      @newsanalysis4831 ปีที่แล้ว

      th-cam.com/video/9mXD82-CUEs/w-d-xo.html

    • @newsanalysis4831
      @newsanalysis4831 ปีที่แล้ว

      ​@@gytiskau1865 th-cam.com/video/9mXD82-CUEs/w-d-xo.html

    • @ethanbvr4227
      @ethanbvr4227 ปีที่แล้ว

      Using a syllabus to judge difficulty is like reading the ingredients to a Michelin Star meal and assuming it's easy to prepare since it uses simple ingredients. Preparation and execution are two different things.
      Switching topics, the class was taught by a professor with the lowest ratings in the school. Resources were seldom provided, ambiguous project/homework requirements, no feedback on work, very unforgiving grader, etc. The way a class is taught is a major factor in determining whether you pass or not.
      It's good that you're looking into these videos in advance which will provide you with a sort of insurance if you get a professor like I did (twice).
      @@Abdullah-ak231

    • @ArnavAg
      @ArnavAg ปีที่แล้ว +22

      @@Abdullah-ak231damn bro you're so smart but who asked?

  • @kafzal101
    @kafzal101 3 ปีที่แล้ว +700

    30:30 That jaw dropping moment!! Never thought that heap sort could be explained so elegantly. Great work sir!

    • @gautamvarmak8207
      @gautamvarmak8207 3 ปีที่แล้ว +14

      Exactly my thoughts

    • @belalr2198
      @belalr2198 3 ปีที่แล้ว +16

      Yeah but exactly at that time after deleting 30 array representation was wrong... It should. be 20 16 8 15 10 right ? Do you know at 30:00 how he swapped 8 and 10? Little bit confused

    • @gautamvarmak8207
      @gautamvarmak8207 3 ปีที่แล้ว +5

      @@belalr2198 Ur right, 8 and 10 should not be swapped. He mistook 10 as the child of 8 and swapped them.

    • @abhishekbharti4857
      @abhishekbharti4857 3 ปีที่แล้ว +4

      @@gautamvarmak8207 Yes he mistook and did it erong. I didn't even notice this cuz I solved it on my own and didn't even matched with his result. After reading this comment I found that there was some error on his side. No biggie.

    • @bejo2357
      @bejo2357 3 ปีที่แล้ว +11

      I was like "DAMN I DIDN'T EXPECT THAT COMING"

  • @bushidocodes
    @bushidocodes 6 ปีที่แล้ว +1055

    I'm a mostly-self taught developer that started a Computer Science masters and found my foundations lacking. It's been a stressful semester, but your TH-cam materials have been the absolute most effective means for me to remediate my algorithm and data structures deficiencies. I just purchased both of your courses. I hope to be able to work on them over the summer, but even if I don't, I wanted to purchase your content to express my gratitude for the excellent free content you provide here on TH-cam. I'll be suggesting your materials to my friends that are learning to code and trying to self-teach algorithms and data structures. Way too many courses focus on flash and polish on their videos at the expense of content. Your videos are great because they focus on content and give us plenty of examples. 🙇‍♂️🙇‍♂️🙇‍♂️🙌🙌👏👏

    • @AkashChandraGupta
      @AkashChandraGupta 5 ปีที่แล้ว +23

      I have taken his classroom course. Everyone in the class was a fan of Abdul Sir. We have so much respect for him.

    • @mayankverma3690
      @mayankverma3690 5 ปีที่แล้ว

      Sir I'm a beginner in c programming can u provide a list of basic programs??

    • @mayankverma3690
      @mayankverma3690 5 ปีที่แล้ว

      @@naveenchowdary7959 thanks sir

    • @mayankverma3690
      @mayankverma3690 5 ปีที่แล้ว

      @Mahendra Singh Udemy Abdul Bari

    • @karupakulasampath
      @karupakulasampath 5 ปีที่แล้ว

      @Mahendra Singh you will find links in description

  • @amitrust
    @amitrust 2 ปีที่แล้ว +306

    Greatest achievement of a teacher is not to teach a student but to make a student curious and interested so that he can pursue on its own. You are one of the greatest teacher i have come across Abdul Sir. If learning from your YT videos can be so much interesting then i wonder how will it be to learn in-person from you.

    • @abdul_bari
      @abdul_bari  2 ปีที่แล้ว +107

      Wow, thank you

    • @newsanalysis4831
      @newsanalysis4831 ปีที่แล้ว

      th-cam.com/video/9mXD82-CUEs/w-d-xo.html

  • @ShailShah98
    @ShailShah98 3 ปีที่แล้ว +296

    Pausing at 30:42 and taking a time to appreciate the simplicity of this video. It is an absolute gem and the way he taught Heap-sort was brilliant.

    • @ninjaa9087
      @ninjaa9087 2 ปีที่แล้ว +5

      yea I paused too

    • @sharonmega5678
      @sharonmega5678 2 ปีที่แล้ว +9

      @@ninjaa9087 That is exactly what I am doing, the transition to heap sort was so smooth!

    • @ak-learntocode6539
      @ak-learntocode6539 2 ปีที่แล้ว +2

      You got me 😳😳

    • @Picklerick8859
      @Picklerick8859 ปีที่แล้ว +1

      Same!!

    • @LSRBY
      @LSRBY ปีที่แล้ว +5

      It was just a chef's kiss right there

  • @shivamsinghnegi1192
    @shivamsinghnegi1192 3 ปีที่แล้ว +171

    What a beautiful and smooth transition from deletion of an element from heap to sorting the heap.

  • @minhazulislam4682
    @minhazulislam4682 3 ปีที่แล้ว +51

    40:52 "copy everything from the board or (moves away from the frame) take a snapshot" that's what an awesome teacher is. Always knows what the students need.

  • @WafflerMark
    @WafflerMark 5 ปีที่แล้ว +100

    I've been a CS teacher, and I applaud your use of multiple diagrams to show the step-by-step results. Well done!

    • @recursion.
      @recursion. 3 ปีที่แล้ว +2

      Thank you for all the efforts! you guys are an unsung heroes!

  • @abrarraza9877
    @abrarraza9877 5 ปีที่แล้ว +405

    Missing u alot ... you're the person who taught Algorithms in a very soft way .... great man... stay blessed 🤲 Allah bless u ...

    • @toddmoore112
      @toddmoore112 5 ปีที่แล้ว +16

      what do you mean by missing him ? is he fine ?

    • @rimpinag6346
      @rimpinag6346 4 ปีที่แล้ว +6

      Why u say that missing him ? He is fine ??

    • @rajopriyochanda8316
      @rajopriyochanda8316 4 ปีที่แล้ว

      Why are you telling so ??..is he fine???

    • @purplegalaxy5265
      @purplegalaxy5265 3 ปีที่แล้ว +2

      @@rajopriyochanda8316 Yes, he is fine! ALHUMDULILLAAH

  • @rishabhshah3923
    @rishabhshah3923 3 ปีที่แล้ว +39

    Abdul Sir, I have been working professional for 10 years now but never have I ever been so comfortable with Heaps. Thank you for making it so easy and clear for us.

  • @notforwork
    @notforwork 4 ปีที่แล้ว +34

    2:04
    I can tell you exactly what kind of content you will get after purchasing this course. I purchased the java, DS courses e 2 months ago. The courses are fabulous and the concepts are covered in great detail. Not just for exams or interviews but the knowledge provided is also superb
    Don't think twice before purchasing this course. I got a lifetime validity on this one.

  • @sujalthakkar2118
    @sujalthakkar2118 หลายเดือนก่อน +1

    I am halfway finished with the insertion in the max-heap part, and I can't help but type this out. Your explanation is so good that it almost feels like I already know all of this, and I'm just revising. It's incredible! Teachers are truly like gods.

  • @jjary01
    @jjary01 4 ปีที่แล้ว +261

    30:50 best part.. how he subtly moved into the concept of heap sort leaving no doubt in mind. Excellent teaching.

  • @bharathjain2633
    @bharathjain2633 5 ปีที่แล้ว +94

    #Respect.. 50 mins went so interesting like a movie :)

  • @AnitShrestha
    @AnitShrestha 5 ปีที่แล้ว +208

    31:33 - I am pausing to appreciate the effort!
    Thank you very much again. The clarity in simplicity is awesome. In my decade of software development engineer career I have found very few as this great explanation of the core computer science topic. Looking forward to complete the playlist.

    • @AnitShrestha
      @AnitShrestha 5 ปีที่แล้ว +13

      ​@@abdul_bari I am from Kathmandu, Nepal. I completed by Bachelor's Degree in Information Management from Tribhuvan University, 2009, Kathmandu, Nepal.
      And I am near about completing the playlist :)
      I think the next step or the future videos I would love to see would be on ML and it's related mathematics because this topic is becoming very much popular and I find the usage becoming relevant to many people from various backgrounds.
      Thank you very much for the great effort in making such wonderful tutorials for people like me who is always looking forward to improve and learn.
      I look forward to your future videos.

    • @jackfrost8969
      @jackfrost8969 5 ปีที่แล้ว

      @@AnitShrestha so after a decade what made you revisit?

    • @AnitShrestha
      @AnitShrestha 5 ปีที่แล้ว +6

      @@jackfrost8969 When ever I learn new languages or re-cap on the ones that I have used before, I do it by learning: data structures and algorithms. Doing this helps to get more insights about the usage of the language and adds more problem solving skills with that language. I am not an expert, just some one who learn new things and revisit to basics always adds depth and as well as different perspective as a software engineer. Thanks.

  • @siddhant7645
    @siddhant7645 3 ปีที่แล้ว +4

    I rarely leave a comment on youtube but the quality of your teaching is so good that i had to leave a comment for you. Sir, the way that you explained heapsort and its intuition made me smile. The mark of an exceptional teacher in my eye is one who teaches in a way that makes a concept obvious to a student. Thank you so much sir! this was an incredible lecture

  • @muntazirabidi
    @muntazirabidi 2 หลายเดือนก่อน

    This is one of the clearest explanations of heaps I've seen. I really appreciate how you built up the concepts gradually - starting with binary tree representation, then complete binary trees, before diving into heaps. The visual demonstrations alongside the array representations really helped show how heaps work in practice. Your careful walkthrough of insertion, deletion, heapify, and heap sort showed not just how they work but why each step matters. The final connection to priority queues helps show why heaps are so useful in practice. Thank you for creating such a thorough and well-structured lesson!

  • @TheGerakas
    @TheGerakas 5 ปีที่แล้ว +48

    The apple pilling in the grocery store with the heap lectures where the best example given so far, smart!

  • @GrowYourCareer
    @GrowYourCareer 5 ปีที่แล้ว +124

    Just want to point out how much work goes into making videos like these - first he has learned and mastered the material better than most instructors I have ever met. That takes decades.
    Then material and examples must be prepared. Video has to be recorded and edited. If a video is one hour, easily it can take 4-5 times longer to make it. Thank you for these incredible videos. You dive in and cover the content in a way that makes it "click"!

  • @romaroy9313
    @romaroy9313 5 ปีที่แล้ว +112

    U saved me sir from failing in this subject. Thanks a lot sir..

  • @0x000dea7c
    @0x000dea7c 2 ปีที่แล้ว +4

    That apple example was the key for me. After that, I felt like everything was put in place in my brain. I can't forget about Heaps now! Thank you Abdul. Much love from Uruguay.

  • @codeisawesome369
    @codeisawesome369 2 ปีที่แล้ว +4

    This is an excellent explanation of Heap mechanics and heap sort!

    • @newsanalysis4831
      @newsanalysis4831 ปีที่แล้ว

      th-cam.com/video/9mXD82-CUEs/w-d-xo.html

  • @Madhavan2020
    @Madhavan2020 6 ปีที่แล้ว +54

    Awesome explanations sir, I never felt confused at any single point in time in this complete lecture. Thanks a lot.

  • @TylerSoBored
    @TylerSoBored 3 ปีที่แล้ว +17

    Your tutorials have demystified data structures for me. When I was in college taking these courses, it was overwhelming and confusing. But, the way that you break it down makes so much sense and it actually makes it enjoyable!

  • @mehul21
    @mehul21 5 ปีที่แล้ว +27

    The most amazing explanation of Heap I’ve ever seen. Made a difficult topic feel like a walk in a park.
    Thank you for posting this level of amazing contents free for all.
    (Purchased your DS&A course on Udemy now).
    Thank you.

  • @bhanukadissanayake9988
    @bhanukadissanayake9988 12 วันที่ผ่านมา

    You saved me when I was a CS student. Now I'm watching these to refresh my knowledge in DSA as a Software Engineer. Thank you and God bless you!

  • @PawanKumar-jk1yy
    @PawanKumar-jk1yy 10 หลายเดือนก่อน +2

    51 minutes of pure knowledge and valuable in formation ! We humans take granted of so many things if we get it for free or just like that very few can understand the value of this video . Thank you so much sir for sharing your knowledge and wisdom .

  • @depressoespressoo
    @depressoespressoo 2 ปีที่แล้ว +3

    I was genuinely sitting in my algo class so lost and depressed thinking I am stupid for not understanding heaps, but you explained it so articulately and clearly, I can't believe it's that simple! Amazing work!

  • @celina6204
    @celina6204 3 ปีที่แล้ว +17

    This is amazing. You have such a calm and slow way of teaching and it makes me very relaxed, but also knowledgeable. Thank you!

  • @bapynshngain
    @bapynshngain 3 ปีที่แล้ว +6

    You are a hero sir! To every Compurter Science Students. Every single concept of Heap explained so properly and with great details! No other teachers could have gone to such lengths as you! I really wish you the best of health and best of everything!

  • @xiaoxu5590
    @xiaoxu5590 ปีที่แล้ว +1

    Thanks! Greeting from a Chinese student.

  • @MihirMishraMe
    @MihirMishraMe 2 ปีที่แล้ว +2

    Hey Abdul - you are an amazing teacher, Thank you !

  • @exam_dost
    @exam_dost 4 ปีที่แล้ว +62

    Abdul Bari sir , mycodeschool , saurabh shukla sir are legends for students of CS :)
    Will be thankful of u forever. A teacher's knowledge will be with us forever.

    • @ANAS-ex3ru
      @ANAS-ex3ru 3 ปีที่แล้ว +3

      chilla chilla ke sab ko sceme bata de...

    • @exam_dost
      @exam_dost 3 ปีที่แล้ว +3

      @@ANAS-ex3ru nahi bhai koi is scheeme me nahi jaega unko ytber wale bhaiya ki journey dekhne me jyada interest hai naa ki actual coding krne se.

    • @ashvinikumar3417
      @ashvinikumar3417 5 หลายเดือนก่อน

      👍🏼

  • @jindagi_ka_safar
    @jindagi_ka_safar 4 ปีที่แล้ว +7

    Creating a Heap is inserting all the elements of a given array into an existing heap assuming the first element of the given array as the initial heap, where as Heapify is simply creating a CBT ( complete binary tree) with all the elements of the given array and then converting that CBT into a heap, by moving up from the last non-leaf node up to the root. Great explanation as ever.

  • @VineetK
    @VineetK 5 ปีที่แล้ว +46

    One hour long lectures are very monotonous and hard to follow but this was not. Excellent content sir :)

  • @blossomwithcurls
    @blossomwithcurls 4 ปีที่แล้ว +5

    Best teacher ever! I can't imagine how I struggled to understand heaps, but after landing here..man! I must say I grasped everything.

  • @daseremuidsa4104
    @daseremuidsa4104 ปีที่แล้ว +1

    I saw this video the night before an interview. Learnt what a was heap for the first time. I am lucky so I got heap question and I implemented for the first time in the interview. I owe this man the internship I got

  • @Maryam_Qureshi
    @Maryam_Qureshi 3 ปีที่แล้ว +5

    He is giving the toughest concepts just like doing everyday conversation with a friend. My GOD! I am scoring an A tomorrow and I dedicate that to you. May Allah gives you all the success and fame which is inevitable for you! :)

  • @braten9
    @braten9 6 ปีที่แล้ว +42

    Yay! Heaps are my favorite. 😁 I am glad you are back on TH-cam again sir!

  • @haridevanarsiah140
    @haridevanarsiah140 2 ปีที่แล้ว +4

    I clapped my hands at the end of this video. Beautifully explained with great details. Hats off to you Sir.

  • @MohamedIbrahim-bv2pl
    @MohamedIbrahim-bv2pl 5 หลายเดือนก่อน +1

    I recently started watching your videos and I'm really fascinated by the simplicity and clarity by which you teach. That shows the command you have on the subject. Thank you so much!

  • @ayushisingh5034
    @ayushisingh5034 หลายเดือนก่อน

    Sir you have made it so simple. I couldn't get the concept with any tutorial, but you made it so easy to understand. I can't express my regards to you. You are a gem. Thank you so much sir.

  • @tanmoydebnath5877
    @tanmoydebnath5877 5 ปีที่แล้ว +5

    Sir, ur video just got an Ad from Game of Thrones and watched it full. My exam is tomorrow and u r the savior.

  • @aishwaryadwani9365
    @aishwaryadwani9365 4 ปีที่แล้ว +7

    Abdul Sir is alone a university for me . I have cracked 2 interviews on the basis of DS , and all its credit goes to sir. Heartly thankyou sir for god level videos/explainations.

    • @abdul_bari
      @abdul_bari  4 ปีที่แล้ว +7

      Congrats !! Adwani

  • @jenishmodi4769
    @jenishmodi4769 3 ปีที่แล้ว +10

    30:29 what a moment sir you are the bestest in teaching this deep concepts easily ,your flow of teaching concept is just remarkable,thank you sir for creating such a wonderful playlist.

  • @NazeerBashaShaik
    @NazeerBashaShaik หลายเดือนก่อน +1

    Clear explanation, watching it after 5 years still I cant find any other video with such clear explanation.

  • @yoddha621
    @yoddha621 3 ปีที่แล้ว +2

    Never thought that I will be able to understand Heap sort this easily . I literally smiled when he said that this is only heap sort .

  • @melissarahman5408
    @melissarahman5408 ปีที่แล้ว +3

    You are an incredible teacher, Abdul Sir. You teach every topic in such a simple way. Thank you for making these videos. It is an honor learning from you.

  • @MK185054
    @MK185054 3 ปีที่แล้ว +25

    Abdul Bari sir proved that "Simplicity beats complexity"..
    I see where he would have struggled during his graduation, hence he is emphasizing there with a little stressing voice in the video to make you note on certain points. Myth resolver!!

    • @himanshutripathi5216
      @himanshutripathi5216 3 ปีที่แล้ว +1

      In heapify at last he did two iteration. Two is the size of tree here. So if number of elements are n we have to do log(n) iteration (Depends on case). So, going through each node will take n time and heapify will take logn time. Therefore time complexity should be O(nlogn) for heapify. Isnt it????

  • @Cosmocygno
    @Cosmocygno 4 ปีที่แล้ว +11

    Such a talented and understandable teacher..To the point and and actually have such a great teaching technique..Million times of respect for you sir

  • @RockLee-un6xw
    @RockLee-un6xw 3 ปีที่แล้ว +2

    Thank you, sir. I am from China, and have trouble in English. With subtitles, this is the first time that I feel algorithm is so easy to understand

  • @enoughgame1006
    @enoughgame1006 18 วันที่ผ่านมา +1

    I have all three paid courses. Thank you and Alhamdulillah.

  • @santokhsingheng
    @santokhsingheng 4 ปีที่แล้ว +5

    You have a natural talent when it comes to teaching!! Awesome explanation, one go through your video and one can never forget the concept. Thank you

  • @mridulkhurana533
    @mridulkhurana533 5 ปีที่แล้ว +8

    Mann, you are the best teacher I have ever come across. Kudos..!

  • @blaq_da_greater
    @blaq_da_greater 5 ปีที่แล้ว +44

    This man just looks like he loves imparting KNOWLEDGE!

  • @chaoticmind-z
    @chaoticmind-z 4 หลายเดือนก่อน +2

    Brother Abdul Bari. May Allah bless your soul, you’re the best teacher I have ever seen. I wish I was your actual student in person. Your teaching style is so beautiful mashAllah

  • @homi.mp3
    @homi.mp3 3 ปีที่แล้ว +1

    Completely flabbergasted after watching this lecture; unbelievable explanation of the concept of HEAP. The world needs more teacher like Mr. Abdul Bari who can make ambiguous topics so easy to understand. Looking forward to take more of your courses.

  • @naazmahir7982
    @naazmahir7982 4 ปีที่แล้ว +8

    I really feel the lack of exact words to express my gratitude towards you sir , every second of yr video is worth watching , its like you go inside the students mind , see their level of understanding & then teach it the way students can get the whole concept behind it , thank you so soo much Sir , you're great!!

  • @RaulVillanueva82
    @RaulVillanueva82 5 ปีที่แล้ว +21

    Wow, what a way to explain. Definately mi favorite algorithms teacher. Greets from México

  • @AmaraAnigbo
    @AmaraAnigbo 5 ปีที่แล้ว +10

    You are amazing! You teach so clearly and make me see the gaps in my knowledge. Thank you, Professor Bari!

  • @adityabhandari6688
    @adityabhandari6688 3 ปีที่แล้ว +2

    such a great explanation... nothing beats experience.. no animation or anything beats a traditional teaching style by an experienced personnel

  • @jataman123
    @jataman123 2 ปีที่แล้ว

    I really like your videos, because there is no bullshit, small talk, or trying to be funny. Just professionalism and clear explanations.

  • @xshadow193
    @xshadow193 5 ปีที่แล้ว +10

    Bless you, I got through my Data Structures class because of your amazing tutorials!

  • @SaurabhSanuSharma
    @SaurabhSanuSharma 2 ปีที่แล้ว +7

    Let’s appreciate the way as he taught Us DSA , in my clg i also watched his videos only, thank you so much sir for providing these easy way of explanation.❤🙏🏻

    • @newsanalysis4831
      @newsanalysis4831 ปีที่แล้ว

      th-cam.com/video/9mXD82-CUEs/w-d-xo.html

  • @ajaywadhwa3398
    @ajaywadhwa3398 3 ปีที่แล้ว +4

    What a crystal clear explanations Sir !!! Words are less to justice your teaching talent . God Bless you sir .

  • @saahilnayyer6865
    @saahilnayyer6865 3 หลายเดือนก่อน

    This video is the golden ground-truth on everything you need to know about Heaps in such simple but detailed manner!

  • @standongiant
    @standongiant 3 ปีที่แล้ว +3

    i have never felt more happy about learning than watching this video

  • @teetanrobotics5363
    @teetanrobotics5363 6 ปีที่แล้ว +17

    You're an incredible professor with a lot of knowledge. It is a pleasure to take lectures from you.

  • @naveennoel9496
    @naveennoel9496 4 ปีที่แล้ว +10

    Sir if I ever meet you personally, I would give you a standing ovation

  • @user-w87b7egvss
    @user-w87b7egvss ปีที่แล้ว +1

    You are an amazing teacher! Every time I watch one of your videos, I get mind blown by how everything makes sense. Thanks so much, you are the reason I understand Algorithms

  • @falakchudasama9746
    @falakchudasama9746 11 หลายเดือนก่อน +2

    I can literally watch your vdos for a day straight and pass my entire sem

  • @mohammedarafatlone
    @mohammedarafatlone 5 ปีที่แล้ว +1472

    The 50 people who disliked are University teachers who are probably jealous 🤣🤠

    • @jugganuat6440
      @jugganuat6440 5 ปีที่แล้ว +9

      Because their not getting paid

    • @celsiusfahrenheit1176
      @celsiusfahrenheit1176 4 ปีที่แล้ว +1

      Arafat Khan lol yes

    • @jaigupta285
      @jaigupta285 4 ปีที่แล้ว

      Which University?

    • @hannahm9259
      @hannahm9259 4 ปีที่แล้ว +1

      😂😂😂😂👍

    • @vsaihruthikreddy7127
      @vsaihruthikreddy7127 4 ปีที่แล้ว +6

      @@jaigupta285 whats app university ...and my proffesor is literally from there so i came here

  • @fezanbhatti1292
    @fezanbhatti1292 2 ปีที่แล้ว +2

    Sir I purchased your course on Udemy with discounted price and soon I will start taking course lectures after finishing your TH-cam playlist. Ma Sha Allah I started feeling confident in Algos after that. Jazak Allah
    Keep it up Sir. You are doing great work 👏 🙌 👍

  • @Lawton407
    @Lawton407 3 ปีที่แล้ว +5

    I was gonna buy your course today, but it’s at $99. I will have to save a bit first, but I know it will be worth it because you’re the only person that can make me understand this stuff.

  • @alemayehuberihun9850
    @alemayehuberihun9850 2 ปีที่แล้ว

    You are an amazing teacher I have ever seen in my academic journey. I feel like I am sitting for 5 minutes for your 51 minutes lecture

  • @Baraaabdelsalam
    @Baraaabdelsalam 3 ปีที่แล้ว +2

    You are the best instructor ever, I wish I found this channel 5 years ago when I was a student.

  • @160_mesbahhasan4
    @160_mesbahhasan4 4 ปีที่แล้ว +6

    Sir..We the Bangladeshi student's are very much grateful to you.Even teachers from our universitie's suggest your algo videos .But one thing to mention!! Please don't stop making videos on algorithms and data structures.Please include more and more advance algorithm in your playlist.I discovered myself and my friends viewing your videos even before the very last moment of exams.May Allah bless you..

  • @osamasiddique9602
    @osamasiddique9602 5 ปีที่แล้ว +42

    Tomorrow is my exam and i m learning it from my favourite teacher and the fun part is that my class teacher has also seen your videos to teach us. He has taken the same examples u taught here of all topics😂😂

    • @nishant1877
      @nishant1877 5 ปีที่แล้ว +6

      The college seems fraud to me

    • @abhineelnandi9552
      @abhineelnandi9552 3 ปีที่แล้ว +1

      @@nishant1877 😂😂😂😂😂

  • @Sudarshansridhar
    @Sudarshansridhar 5 ปีที่แล้ว +65

    i would have cleared my algorithms paper with A+ if i found you in 2002.

    • @shubhammishra8760
      @shubhammishra8760 4 ปีที่แล้ว +7

      I appreciate ur desire for learning even after so long ....!!!

    • @jay-rathod-01
      @jay-rathod-01 4 ปีที่แล้ว +1

      bro job karte karte kyu dekh raha hai, i thought concepts of dsa arent used when you join as a developer

    • @cannonbolt2595
      @cannonbolt2595 3 ปีที่แล้ว +1

      @@jay-rathod-01 did he tell you that he got a job?

  • @sergeykas90
    @sergeykas90 3 ปีที่แล้ว +2

    Wow Mr. Bari...
    Your first series about complexity were great, but here you clearly supercharged yourself, very very good content.
    Natural talent, thank you for sharing your knowledge and amount of time and effort you put in these Algorithm series.

  • @tooniatoonia2830
    @tooniatoonia2830 2 ปีที่แล้ว +1

    Was scared when I saw the long list of concepts to be covered but could not stop watching once I started. Thank you Prof. Bari!

  • @pawansv6214
    @pawansv6214 4 ปีที่แล้ว +4

    You have explained it so well sir...The way you taught was really great and it is easy to understand as well....Thank you so much sir.

  • @parispharis2066
    @parispharis2066 2 ปีที่แล้ว +142

    There is a small mistake at 29:41, when deleting 30 from the heap, 8 is swapped to the root. it should compare 16 and 20 to 8, and use 20 as the new root, thus 20 and 8 is swapping place. No further swaps are needed, resulting in heap in state 20, 16, 8, 15, 10.

    • @AaratsPAC
      @AaratsPAC 2 ปีที่แล้ว +7

      Yes, that seems to be true.

    • @ronanpatrick5763
      @ronanpatrick5763 2 ปีที่แล้ว +4

      yeah good spot

    • @KarthikRamurg
      @KarthikRamurg 2 ปีที่แล้ว +1

      Anyhow, don't we need to compare 8 and its child 10? which is ultimately 20,16,10,15,8

    • @wb30riderdip80
      @wb30riderdip80 2 ปีที่แล้ว

      yes

    • @jedodiah5684
      @jedodiah5684 2 ปีที่แล้ว +6

      @@KarthikRamurg Negative on the comparison. The children of 16 is 15 and 10. The children of 8 is NULL and NULL. When comparing children to parent (i) the index is left (2i) and right (2i+1). In the video he compared index 3 with index 5. When actually index 3 can only be compared with either indexes 6 & 7. However, those nodes were deleted and replaced with previous maxes( index 6 of value 30) and (index 7 of value 50). The next deletion of 20 would render the tree to be 16, 15, 8, 10. Where indexes 5, 6, & 7 are holding previous max values of 20, 30, & 50.

  • @abhiramdurgaraju5914
    @abhiramdurgaraju5914 5 ปีที่แล้ว +6

    Started my masters in computer science this semester and it has been pretty stressful as I lack the fundamental knowledge of my classmates who did their bachelors in CS. This channel has literally saved me for the Algorithms final exam. Thank you Mr. Bari for all your hard work, your method of teaching is incredibly effective. I will definitely recommend this channel to other classmates in need.

  • @ashishmh
    @ashishmh 3 ปีที่แล้ว +1

    Amazing explanation. I knew all the concepts before but still watched the video at 1.5x to the end because the explanation is so intuitive and clear.
    It seems magical to me that the same contiguous allocation of memory can function as arrays and heaps both with wildly varying time complexities for the same functions. Algorithms and mathematics in general is beautiful :)
    Will be donating something to the Patreon link as well to show my support for making education accessible to everyone.
    Everyone should give this guy a coffee to show appreciation for his time and energy to make awesome content.

  • @jianqingwang939
    @jianqingwang939 4 ปีที่แล้ว +2

    Mr.Abdul is the best teacher I have ever met!
    tyvm

  • @vishalRaj-mc4bd
    @vishalRaj-mc4bd 6 ปีที่แล้ว +8

    Sir...You are "One And Only".. You're Great Sir!!!!☺

  • @neha_coding5563
    @neha_coding5563 3 ปีที่แล้ว +4

    Throughout my 1st sem of B.tech upto now(5th sem)...I already had a fear of the Sorting algorithms...but now...all of them looks so easy sir..Thanku so so sooo much sir...u made these topics so easy!!! Like seriously..I was literally so depressed that how will I cover this...coz I was unable to find any proper resource...and..I finally got ur lectures sir...Thanku again sir!

    • @leetcoder1159
      @leetcoder1159 3 ปีที่แล้ว

      Do you want to be software enginner at Google?

    • @neha_coding5563
      @neha_coding5563 3 ปีที่แล้ว

      @@leetcoder1159 yes

    • @neha_coding5563
      @neha_coding5563 3 ปีที่แล้ว

      @@leetcoder1159 yes...but what does this pair up means?

    • @leetcoder1159
      @leetcoder1159 3 ปีที่แล้ว

      @@neha_coding5563 I mean helping each other in problem solving

    • @neha_coding5563
      @neha_coding5563 3 ปีที่แล้ว

      @@leetcoder1159 sure

  • @kevinwirth2548
    @kevinwirth2548 2 ปีที่แล้ว +3

    Thank you so much. Such a good explanation. I think you are helping a lot of CS studens in this world keep up the good work. Greetings from germany

    • @newsanalysis4831
      @newsanalysis4831 ปีที่แล้ว

      th-cam.com/video/9mXD82-CUEs/w-d-xo.html

  • @lover1301
    @lover1301 2 ปีที่แล้ว

    I have not found someone who explains and simplifies things more than you
    , you unique person I love you

  • @pasej5
    @pasej5 ปีที่แล้ว

    This is by far the BEST Tutorial on Heap Sort. Thank you for this. Much love from South Africa

  • @sushmareddy1370
    @sushmareddy1370 4 ปีที่แล้ว +5

    24:40 Mind blowing. I always wondered why the last node is placed at the top after deletion.. now I got the answer.

  • @hrishikeshraskar580
    @hrishikeshraskar580 4 ปีที่แล้ว +3

    I wonder how will it feel to touch life of so many students with such impacting work .

  • @CherryBomb-
    @CherryBomb- 4 ปีที่แล้ว +17

    Just one thing to say: Thanks a lot

  • @ahsansiraj7505
    @ahsansiraj7505 8 หลายเดือนก่อน +1

    Sir You are rare gem on youtube may allah grant you jannah and bless you with his blessings .
    Jazak Allah hu Khaira❤

  • @Manji000
    @Manji000 ปีที่แล้ว +1

    I skipped your videos several times. Thought you are another boring teacher. I was super wrong. You made me realize how easy data structures really is. I owe you. Sending love.

  • @harshith0844
    @harshith0844 3 หลายเดือนก่อน +3

    30:42 pure magic 🪄