Representation of Heap | Important Concepts

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

ความคิดเห็น • 74

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

    No bullshit and straight to the point, I really like your explanation and way of teaching. Awesome!!

  • @-ananth
    @-ananth ปีที่แล้ว +7

    i have searched through many channels for heaps..but none beats this....very clear explanation...

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

    Bhai please have a smile on your face. Thank you so much for adding valuable content on TH-cam. I would like to see a smile on your face ♥

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

      Thanks for your motivation ☺️

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

      @@techdose4u You are the motivation and inspiration for all the students. We all are proud to have a teacher like you 💪

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

      Thanks :) I wish our student base will keep on increasing and the course helps maximum of them 🤓

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

      @@techdose4u We need to be next to the entrepreneurs of the World 💪

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

    This is clear explanation of Heap Data Structure. Really nice video. Please keep producing such contents.

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

    Man you are one hell of a teacher. Impressed 👌

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

    Superb Heap DS Course on the Entire Planet 😊🙏

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

    thank you , your way in explaining is amazing

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

    Best tutorial on TH-cam 🔥🔥

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

    this is so useful and helpful! so glad i found this course, much thanks to you for teaching this sir ❤❤

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

    Finally understood Heaps, huge thanks!

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

    Very Impressive way of teaching ....No bullshit direct coming to the point...👍👍👍

  • @sagarsingh-wb8ou
    @sagarsingh-wb8ou 3 ปีที่แล้ว +3

    At 11:29 in the first tree if I swap tree nodes having value 6 and 7 then it will still be a maxheap but the array wont be in decreasing order..

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

      @sagarsingh-wb8ou Yeah you are right, it need not be always in decreasing and increasing order

    • @anishpatwardhan4654
      @anishpatwardhan4654 7 วันที่ผ่านมา

      the statement mentioned is w.r.t array and not vice versa so it holds true

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

    Bessttt thing I found today 🔥

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

    @Techdose10:17 Your explanation is far better... I have a doubt...
    For Range of leaves (CBT) - y don't you use ceil of (n/2) instead of floor(n/2)+1?
    And the array need be always in increasing and decreasing order right?

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

    Keep up the good work :)

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

    Awesome content. Thanks a lot. :)

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

    At 0:30 is that level order ?

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

    i enjoy these videos but i want to give just 1 tiny advice try to say binAry not binDry tree, after first few videos i got used to it somewhat but its stil strange hearing bindary other than that its all good and informative so thank you

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

    superb explanation..

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

    brother can you please make a video on, I found it very difficult. 1371. Find the Longest Substring Containing Vowels in Even Counts

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

    I think the definition of height of a node in this video is wrong. The height of a node is defined as the number of edges from that node to the deepest leaf. So all the leaf nodes will have a height of 0 and root node will have the maximum height and that would be consider to the height of the tree itself. Please correct me if I'm wrong.

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

    Which drawing software u r using sir ?

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

    Would I have to learn all these formulae?

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

    thank you so much

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

    I’m sorry I don’t understand how i/2-1 works? In your example is 3/2=2? How does 3/2 = 2?

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

      ceil of 3/2 is 2

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

      ceil aka ceiling with its brother floor aka flooring
      what it means ceil -> returns the smallest integer value which is greater than or equal to the specified number
      for example ceil(1.5) = 2 cause 2 is the smallest and greater integer
      while floor(1.5) = 1 because its the opposite of ceiling as in returns the closest integer that is smaller than or equal to the specified number
      and its not the same as rounding dont get confused
      because ceil(1.2) is also = 2
      and floor (1.9) is stil = 1

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

    10:56 timestamp
    For ACBT(Almost complete binary tree) internal node (for N=5) will be from 1 to 3 [1 based indexing]. Someone please correct me if I'm wrong.

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

      Note that, the node:3 is no longer an internal node its a leaf so the internal nodes are just {1, 2} and leaf nodes: {4, 5, 3}

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

      @rajdeepmallick9803
      floor (5/2) is 2, so it is from (1-2)

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

    well DONE

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

    It's great video but I don't understand one concept. How does the range of leaves and range of internal nodes take the maximum value in the given formula? For example, we said the range of leaves for tree with N nodes is floor(N/2) + 1 to N. When N is 7, we get leaves = 4 obviously but how we can get leaves = 7 according to the formula the ranges of leaves will be from 4 to 7?

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

      oh I get it now after watching the next video on heapify algorithm. I thought the range of leaves means the number of leaves it can have. But actually it is the index values of leaves representation in the array.

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

    Sir plzz make a video how to solution codechef questions

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

      Think and solve. Else copy like others. Or wait for Editorials.

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

    at this point, it's all about finding the perfect Indian guy to explain complex things to you 😅😁

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

      😂

  • @BobMarley-qh2qs
    @BobMarley-qh2qs ปีที่แล้ว

    sir help me clear this doubt , what happens when the child node of first element is greater than the sibling node of first element then at that time how does it gonna find the k max element in the heap: for example ,
    90
    / \
    75 68
    / \
    80 45 In this 80>68 and according to heap traversal it traverse from left to right so when it will traverse in second row it's gonna return that 68 is the third largest element.

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

      if i understand correctly your example is not a max heap because your values are not in order a max heap would be like:
      90
      / \
      80 75
      / \
      68 45 this would be a max heap for sure but maybe what you meant to ask is what if we have something like this:
      90
      / \
      80 75
      / \ /
      68 45 60
      would this count as a max heap? or does the numbers need to also be descending from all the way left to right?? i have no idea yet
      like can it be 68 45 60 or need to be as 68 60 45 in order to be considered a max heap
      BUT REGARDLESS in MAX heap the ROOT aka 90 in our example will be always the biggest number encountered in the tree thats guaranteed else its not a MAX heap

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

    thank you sir

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

    Hi sir .can you please make a video on leetcode problem named
    .maximum no of events we can attend sir..or atleast add to your to do queue sir.

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

    i am confused that am i wasting my time by learning the implementation? should not i go with stl??

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

      STL is like V = IR (Ohm's Law formula)
      Implementation of DSA is like learning how Ohm's Law came into picture :)
      Can you be a good engineer by just mugging up formula ?

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

    sir, can you provide the pdf of the notes you making in this video.

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

    Diamond Content

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

    can i get a copy of this ?

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

    Accessing a parent has to be (index - 1)/2. You mentioned as index/2 - 1. Which is not correct in zero based index array.

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

      He said that take ceil of index/2 then subtract 1

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

    DS God

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

    😎

  • @E__ShameemahamedS-bx2ed
    @E__ShameemahamedS-bx2ed 4 ปีที่แล้ว +2

    👍👍👍👍☺☺👏👏👏

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

    we take degree from university but learn from youtube. u !