Write Priority Queue using Heap- Solution | Hashmap and Heap | Data Structure and Algorithms in JAVA

Поділитися
Вставка
  • Опубліковано 15 лис 2024

КОМЕНТАРІ • 87

  • @kumarpriyansh4238
    @kumarpriyansh4238 3 роки тому +30

    This is gem sir. It took me a minute to process how beautifully you taught this concept easily .I have been through some other videos too but my search ends here.

    • @Pepcoding
      @Pepcoding  3 роки тому +1

      Glad it helped! and If you like our efforts, please upvote the comments written by the students about Pepcoding here (www.quora.com/What-are-the-good-websites-to-learn-data-structures-and-algorithms )

  • @ShivamKumar-qk3vd
    @ShivamKumar-qk3vd 2 роки тому +1

    Finally ,I found perfect explanation .
    I was tying to understand this from long time but was not getting any clear explanation ,but randomly I found this GEM which cleared my all doubts by its luster and shine... THANKYOU VERY MUCH FOR THIS AMAZING EXPLANATION.

  • @shrinidhiym6499
    @shrinidhiym6499 2 роки тому +1

    Perfect GURU for DSA, Nobody can teach DSA like you Sir.

  • @rambhaktuchihaobito7987
    @rambhaktuchihaobito7987 4 місяці тому

    Your explanation was amazing! You broke it down perfectly.
    Thanks for being such a great teacher!❤❤

  • @hymnish_you
    @hymnish_you 4 роки тому +3

    Sir you are God + Gold ! Happy Teacher's Day.

    • @Pepcoding
      @Pepcoding  4 роки тому +5

      Thank you beta!! gold to aap mujhe bnaooge achii placements lekrr

  • @new2halder627
    @new2halder627 3 роки тому +1

    Your explanation is second to none. Keep up the good work .

  • @diptendumandal8354
    @diptendumandal8354 Рік тому

    Best Heap video ever.

  • @InderjeetSingh-lb5rk
    @InderjeetSingh-lb5rk 3 роки тому +1

    Sir this is over powered...thanks a ton!!😁😁

  • @harshitkaushik4144
    @harshitkaushik4144 4 роки тому

    Seriously sir commendable job , first time thodi dikkat hui dimag me baithane me lakin second attemp me crystal clear sir

    • @Pepcoding
      @Pepcoding  4 роки тому

      Bhot ache. Mehnat rang laegi

  • @amansharma889
    @amansharma889 3 роки тому

    you are magician sir too good sir Love from Indore

  • @rishabhkukreja6910
    @rishabhkukreja6910 4 роки тому +2

    Thanku for all the videos Sir
    You are doing a really wonderful work for all the students
    You really are inspiring many of us and we appreciate your work a lot

    • @Pepcoding
      @Pepcoding  4 роки тому +1

      Thank you so much. If you like the content, please subscribe and share around in your college whatsapp groups.

    • @rishabhkukreja6910
      @rishabhkukreja6910 4 роки тому

      @@Pepcoding already done sir

  • @ankitphophalia9849
    @ankitphophalia9849 3 роки тому

    Awesome explanation..i have seen so many videos and even bought some courses..none of them was so crystal clear as this. Than You for all your efforts.

    • @Pepcoding
      @Pepcoding  3 роки тому +5

      Beta sbka apna apna pdane ka tarika h aur jo jo faculities h hmare paas unhone mjhse zda bache place kraye h abhi tak, to I'll say that vo mjhse zda effort daalte h apne kaam main.

  • @baidyanathroy7726
    @baidyanathroy7726 2 роки тому

    Brilliant Explaining

  • @prashantmaitra3361
    @prashantmaitra3361 3 роки тому

    this is very useful and crystal clear video. thank u sir for best explaination.

  • @rambo4014
    @rambo4014 3 роки тому

    Tussi great ho sir jee!!! bhagwan aapka bhala kare

  • @Jbwemet
    @Jbwemet 2 роки тому

    Amazing Sir, thank you for this valuable session.

  • @imavij12
    @imavij12 2 роки тому

    Ye data.size()-1 k chakkar me pure video me confuse raha mai 😅
    But chalo end me sahi ho gaya. Awesome explanation sir.

    • @Pepcoding
      @Pepcoding  2 роки тому

      For better experience, visit nados.pepcoding.com, where you will get well curated content and career opportunities.

  • @SumitKumar-sx1oi
    @SumitKumar-sx1oi 3 роки тому +1

    amazing explanation

  • @amartyagunjan
    @amartyagunjan 3 роки тому

    Sir, It's fun learning with you. Thank you so much for making these awesome tutorials. I really loved it.

  • @sukanyasinha3583
    @sukanyasinha3583 4 роки тому +1

    great explanation sir
    Thankyou !!

  • @gayatrimamidwar8364
    @gayatrimamidwar8364 2 місяці тому

    nice explanation sir.. keep it up

  • @AshutoshKumar-es8xy
    @AshutoshKumar-es8xy 2 роки тому +1

    Thanks sir . You are a legend

  • @mehulbisht9708
    @mehulbisht9708 4 роки тому +5

    18:46 sir you are making amazing tutorials ! i have a doubt here, is it mandatory for the class Priority Queue to be static here ? actually i knew basics of c++ from school and this year i started android directly with kotlin , so have this doubt in java syntax.

  • @harishvasisht782
    @harishvasisht782 3 роки тому

    Best ever found on internet 👌

    • @Pepcoding
      @Pepcoding  3 роки тому +1

      Thankyou beta!
      I am glad you liked it. I hope that you are watching till the end and trying to understand what, how, and especially why of the problem.
      If you like our efforts, will you like to write a few words about us here (www.quora.com/What-are-the-good-websites-to-learn-data-structures-and-algorithms )

  • @priyanshuaggarwal5318
    @priyanshuaggarwal5318 2 роки тому

    Great explanation 👍

  • @rahuljha8038
    @rahuljha8038 3 роки тому +1

    sir aap bahut awsome ho

  • @abhikumar2469
    @abhikumar2469 3 роки тому

    U r a dhaansu teacher🙏🙏

  • @suyashlale7315
    @suyashlale7315 2 роки тому

    Why are we assuming it to be a left child to the parent in upheapify()? It can be that the function is called with the last index element being a right child to its parent. Please help clarify. Thanks!

  • @ueeabhishekkrsahu
    @ueeabhishekkrsahu 3 роки тому

    legend is back #sumit sir

  • @rishabhgoyal2835
    @rishabhgoyal2835 4 роки тому +1

    next level explanation , thank you : )

    • @Pepcoding
      @Pepcoding  4 роки тому

      Keep supporting with your comments

  • @DurgaShiva7574
    @DurgaShiva7574 3 роки тому

    indeed, this is a search ending video !!!

    • @Pepcoding
      @Pepcoding  3 роки тому

      For better experience and well-organised content
      Visit - nados.pepcoding.com
      You can post your query on community tab.
      Don't forget to follow us on Instagram
      instagram.com/pepcoding/

  • @rohit8021
    @rohit8021 3 роки тому

    uttam sir

  • @akatsuki1363
    @akatsuki1363 3 роки тому

    Wow👌👌maza a gaya👏🔥

    • @Pepcoding
      @Pepcoding  3 роки тому

      I am glad you liked it. I also hope that you are watching till end and trying to understand the what, how and especially why of the problem.
      If you like our efforts, we request a review
      g.page/Pepcoding/review?rc
      You can subscribe to our channel here
      ua-cam.com/users/Pepcodingabout?view_as=subscriber

    • @akatsuki1363
      @akatsuki1363 3 роки тому

      Already done sir

  • @adarshverma5048
    @adarshverma5048 4 роки тому

    Great Explanation!

  • @tanveershaikh4639
    @tanveershaikh4639 3 роки тому

    Amzing tutorial sir 👍

    • @Pepcoding
      @Pepcoding  3 роки тому

      Thankyou beta!
      I am glad you liked it. If you like our efforts, will you like to write a few words about us here (www.quora.com/What-are-the-good-websites-to-learn-data-structures-and-algorithms )

  • @shubhamagarwal9321
    @shubhamagarwal9321 3 роки тому

    Really nice explanation sir.☺

    • @Pepcoding
      @Pepcoding  3 роки тому

      Thankyou beta!
      I am glad you liked it. I hope that you are watching till the end and trying to understand what, how, and especially why of the problem. If you like our efforts, will you like to write a review about us here - g.page/Pepcoding/review?rc

  • @pranjalbajpai9956
    @pranjalbajpai9956 3 роки тому +3

    Up heapify ka logic galat hai sir, Parent ka index calculate krne me apne ye assume kr lia ki left child add hua hai...it is possible ki right child add hua ho...so pi = (i-2)/2 is also possible

    • @sanatasneem2674
      @sanatasneem2674 2 роки тому

      floor value lenge na toh -1 and -2 dono ka cade cover ho jaega bcox when we divide it by 2 then .5 ka difference aayega and usme floor lene se cover ho jaega

  • @ayushgoel9584
    @ayushgoel9584 4 роки тому +1

    waiting for hashmap implementation video sir

    • @Pepcoding
      @Pepcoding  4 роки тому

      I have made it available. It is with the video-editting team. They will most likely post it 2mrw

  • @ayushgoel9584
    @ayushgoel9584 4 роки тому +1

    sir ek video sirf comparator and comparable par bhi bana dijiye jaise aapne iterator and iterable par bnayi thi

    • @Pepcoding
      @Pepcoding  4 роки тому +4

      bnai hui hai. Kal dalegi. Par wo thodi gobar bani hai. Dekhna ek baar, most likely wo replace karni padegi. Usme jyada repeat kia hai same point baar baar maine. Baaki sab theik hai. Kal aaegi.

    • @ayushgoel9584
      @ayushgoel9584 4 роки тому +1

      @@Pepcoding No problem sir, repeat kia hai toh achi baat hai, dimaag mein set ho jaegi

  • @paurushgargtube
    @paurushgargtube 3 роки тому

    Amazing.. simply the best..

    • @Pepcoding
      @Pepcoding  3 роки тому +1

      Thankyou beta!
      I am glad you liked it. I hope that you are watching the videos till the end. If you like our efforts, will you like to write a review about us here - g.page/Pepcoding/review?rc

  • @somith16
    @somith16 4 роки тому +2

    Sir make a video on how to check is binary tree a heap

    • @Pepcoding
      @Pepcoding  4 роки тому

      Ji, levelup ka question hai. dalega.

    • @somith16
      @somith16 4 роки тому

      @@Pepcoding ji sir daliya pls thanks

  • @rishabhkesharwani8305
    @rishabhkesharwani8305 3 роки тому +1

    zero is sacred place ...hahhaha best explanation ever

    • @Pepcoding
      @Pepcoding  3 роки тому

      Thankyou beta!
      I am glad you liked it. I also hope that you are watching till the end and trying to understand the what, how, and especially why of the problem. If you like our efforts, will you like to review us here - g.page/Pepcoding/review?rc

  • @rahulbhatia3075
    @rahulbhatia3075 4 роки тому +1

    Sir, if we want to remove elements in descending order then how will we write the compare to function?

    • @Pepcoding
      @Pepcoding  4 роки тому +4

      return statement mei jo return kar rhe hai compareto function ki, uss output ko -1 se multiply kar do

    • @rashichawla448
      @rashichawla448 3 роки тому

      @@Pepcoding ye to mergeKSorted mai descending order ke liye ho sakta hai, usme to Collections.reverseOrder() bhi use kar painge but sir is question mae descending ke liye upheapify aur downheapify mai signs hi change karne padenge na?

  • @SKM-ti6bh
    @SKM-ti6bh 10 місяців тому

    When you are saying ‘higher value element have lower priority’ please say the reason behind this , as a hint.

  • @NiranjanKumar-cb8si
    @NiranjanKumar-cb8si 4 роки тому +2

    sir , hashmap ki implementaion ka video bhi do plss

    • @Pepcoding
      @Pepcoding  4 роки тому +1

      han beta, mai bna chuka hun. video-editting team ke paas hai. kal dalega.

    • @NiranjanKumar-cb8si
      @NiranjanKumar-cb8si 4 роки тому

      @@Pepcoding thank u so much sir

  • @goodpeople7615
    @goodpeople7615 4 роки тому +3

    Sir dp on trees ki separate playlist will be helpful :-)

    • @goodpeople7615
      @goodpeople7615 4 роки тому +1

      Will you upload it ?

    • @Pepcoding
      @Pepcoding  4 роки тому +4

      Yes, sure. Ek baar enough volume ban jane dijie. Organise tarah tarah se kar denge.

  • @LegitGamer2345
    @LegitGamer2345 3 роки тому +1

    neat!

    • @Pepcoding
      @Pepcoding  3 роки тому

      Thankyou!
      Keep learning and keep growing!😊

  • @ayushgoel9584
    @ayushgoel9584 4 роки тому +1

    Sir heap and hashmap ke questions portal pe upload karwa dijiye

  • @ketansharma6955
    @ketansharma6955 Рік тому

    downheapify mein toh base condition daali hee nahi hui hai ?

    • @kek_potato696
      @kek_potato696 7 місяців тому

      basically after swappings the recursion stops when either the current node has no children or it is smaller than both of its children, in which case no further swapping is needed and the method returns, effectively ending the recursion for that particular call.

  • @anjneykumarsingh4461
    @anjneykumarsingh4461 4 роки тому +1

    Tree k chasma

  • @code7434
    @code7434 4 роки тому +1

    Tough DP, GREEDY QUESTIONS