3.1 Knapsack Problem - Greedy Method

Поделиться
HTML-код
  • Опубликовано: 31 окт 2024

Комментарии • 1 тыс.

  • @efyoubadly
    @efyoubadly 5 лет назад +860

    Perfect data structure teacher don't exi---- lol Prof.Abdul bari is the perfection.

  • @aravindhravichandran5152
    @aravindhravichandran5152 5 лет назад +792

    I am following a greedy method. I just follow Abdul Bari Sir's lectures blindly ❤️.

    • @_smurar_
      @_smurar_ Год назад +7

      Arey bhai bhai bhai bhai

    • @priyankadubey5483
      @priyankadubey5483 Год назад +12

      How you can learn Algorithms... blindly...you must open your eyes 😂😂😂

    • @studyonline3236
      @studyonline3236 Год назад +1

      @@priyankadubey5483 Wah Wah

    • @T.JacobMain
      @T.JacobMain Год назад

      ​@@priyankadubey5483hearing exists 😭

    • @msatwikreddy4569
      @msatwikreddy4569 4 месяца назад +6

      ​@@priyankadubey5483 wowww so funyyyyyy hahahahah, pls get back to kitchen

  • @Novodip
    @Novodip Год назад +407

    for the newcomers,xipi will be 55.3,not 54.6...There is a slight mistake in the calculation.Amazing Teacher Btw 😎😎

    • @hitesh1800
      @hitesh1800 Год назад +22

      Pi/xi of 5/3 =1.667 not 1.3

    • @ganeshchoudhary8849
      @ganeshchoudhary8849 Год назад +15

      2/3 into 5 = 3.33

    • @meena.9o2
      @meena.9o2 Год назад +33

      Thanks 😭......if you won't have typed it I would have gone into a spiral loop of self doubt that I suck at maths

    • @SameenIslam
      @SameenIslam Год назад +10

      Yes, I can verify that sum(x_i*p_i) = 55.33 there was a minor arithmetic error in the lecture.

    • @cloudygeek970
      @cloudygeek970 11 месяцев назад +4

      Yes I have also this doubt but this was mistake by sir .no worries 👍🏻💯Best teacher

  • @Heronstairs536
    @Heronstairs536 4 года назад +735

    4:51 am. 3 hrs till exam. Thank you sir.

    • @Heronstairs536
      @Heronstairs536 4 года назад +13

      @@user-zf3bh4og6f haha goodluck !

    • @gourab469
      @gourab469 4 года назад +5

      @@user-zf3bh4og6f how did it go?

    • @snehashishsrivastava9018
      @snehashishsrivastava9018 4 года назад +4

      @@user-zf3bh4og6f shit that was close

    • @siddhartharoy179
      @siddhartharoy179 4 года назад +5

      @@user-zf3bh4og6f All the best for the next time. You're a genius, you'll surely nail it next time.

    • @isaicsefxec6721
      @isaicsefxec6721 4 года назад

      @@user-zf3bh4og6f how was the result

  • @khalasianiket816
    @khalasianiket816 3 года назад +136

    Whenever DSA and DAA come into a picture...just say Abdul Bari sir's name...then see the magic...he is hero of DAA and DSA for students like us...lots of love and blessing to you sir😊

  • @GAURAVSHARMA-mu6ri
    @GAURAVSHARMA-mu6ri 6 лет назад +287

    we have been taught by many teachers and some of which are good and very few are best but your one of the greatest from them all . thank you so much sir . you are doing the great service to the nation. thank you again for taking out time for making these videos .

    • @chelidoniii
      @chelidoniii 3 года назад +16

      Not just in your nation but in the world!

  • @pintu_patil
    @pintu_patil Год назад +41

    When I see correction at 5/3=1.66 in the i button I can conclude that only these videos of Abdul sir are enough....thank you sir

  • @anhtainguyen3585
    @anhtainguyen3585 3 года назад +81

    Thanks to this video, I had a perfect presentation in college about this problem, and I received praise from my teacher - a Prof for that explanation. Thank you so much, a big respect to Prof Abdul Bari.

  • @karana2260
    @karana2260 4 года назад +101

    Don't look at the weight , Don't look at the weight!
    You are the best DS / ALgo teacher so far sir : )

  • @maruthupandianm184
    @maruthupandianm184 5 лет назад +2281

    Students: why it's so difficult to understand Data Structure and algorithm?
    Prof Abdul Bari: Hold My Camera

  • @dataengrprospect9207
    @dataengrprospect9207 4 года назад +63

    This man is the deal. He explains everything in details. Thank you. I have exam tomorrow. I'm glad I found this video. Had wished I found this out earlier.

    • @nikhilgade201
      @nikhilgade201 2 года назад +1

      Is that optimal solution

    • @manojramesh4598
      @manojramesh4598 2 года назад +1

      Same i have internals tommorow and i didn't know how to solve it until now 😂

    • @manojramesh4598
      @manojramesh4598 2 года назад

      @@nikhilgade201 Yup 👍

  • @sffshuvo
    @sffshuvo 3 года назад +7

    You're a blessing in the field of Computer Science. I've my examination approaching in 2 days and your videos are helping me a lot. May the Almighty keep you well.

  • @nirwanramteke4806
    @nirwanramteke4806 5 лет назад +29

    I am going to write all his statements, examples in my theory exam, thank u sir for creating good explanation.
    Greedy Method, Dijkistra algo, Bellman Ford Algo, LCS, NP complete, Knapsack Problem.

  • @franciscocastro4911
    @franciscocastro4911 5 лет назад +11

    You sir are a god of simple explanations. My professor just explained this but reading formulas off a power point. THANK YOU.

  • @aayushsrivastava9569
    @aayushsrivastava9569 3 года назад +8

    World would be a better place if there were more teachers like him.

  • @vincentborra6960
    @vincentborra6960 3 года назад +340

    I think there is a slight calculation error: 2/3 of a profit of 5 is 3.33 and so the total profit is 55.33
    Great video anyway! Thank you

  • @akshayawasthi599
    @akshayawasthi599 4 года назад +3

    The man of utmost patience and knowledge in teaching.......prof. ABDUL BARI

  • @JX304U
    @JX304U 11 месяцев назад +2

    The best thing about you is that you teach in a relaxed and calm way and it calms me too.😇

  • @jaybhatt6775
    @jaybhatt6775 3 года назад +3

    Abdul sir you are a very rare breed of teachers. you explain even the most complicated algorithms so well ane make it so easy for us to grasp the concept. mind-blowing sir!

  • @rusureaboutthat781
    @rusureaboutthat781 3 года назад +1

    I ve watched so many of your videos when I have questions on a topic and everytime the question why do I waste my time on uni lectures pops in my godamn head thank you for your work man it really helps

  • @Sanatanabhishekaa28498
    @Sanatanabhishekaa28498 6 лет назад +115

    Crystal Clear 👌👌👌
    A Big Thanks From Kerala 👏👍☺

    • @smarteducation47
      @smarteducation47 4 года назад +2

      100 like

    • @murtazamirzaie1109
      @murtazamirzaie1109 3 года назад +1

      why we can not take 7 amount of the first object?? it would be 70 and that's more than what the prof said??? because we want the mux

  • @hingsing1
    @hingsing1 Год назад +2

    you are my favorite professor at youtube university, dr professor master sensei abdul bari sir

  • @bhavyanukala3233
    @bhavyanukala3233 5 лет назад +4

    I think he is the best......even though he is not teaching the algorithm.....he will make us understand within a few minutes.....magic🤗

  • @KamranKhan-vz9sf
    @KamranKhan-vz9sf 3 года назад +1

    Jazakallah sir🤍 bht hi zyada shukrya🤍 allah aapko pambi umr or achi sehat de🤍🤍

  • @satyanarayanmohanty3415
    @satyanarayanmohanty3415 4 года назад +8

    Algorithms are so much easier when this man teaches.

  • @brijpatel237
    @brijpatel237 6 лет назад +19

    Thanks Sir!..just add in description than value of profit is 55.33

    • @drewkelly3622
      @drewkelly3622 5 месяцев назад

      glad i got this total as well. He made a mistake when doing 2X1.3 when it shouldve been 2/3 X 5 = 10/3 = 3.3333333

  • @muraligunturi5468
    @muraligunturi5468 6 лет назад +179

    The answer is 55.3 for xi*pi

  • @_a_r_un_
    @_a_r_un_ 10 месяцев назад

    When ever i need any algorithms i firstly come to the abdul bari sir channel only ❤
    Best explanation ever

  • @anjalisn4
    @anjalisn4 4 года назад +43

    Some day, if I step into a teaching career, I would be wanna you!

  • @zohaibhamdule
    @zohaibhamdule 2 года назад +1

    This is better than many paid courses!

  • @NotSionnix
    @NotSionnix 5 лет назад +7

    This man really is the GOAT on YT for CS students :pray:

  • @A_23_GAURAVDESAI
    @A_23_GAURAVDESAI Год назад

    i have exam tommorow on this topic and by reading PPT I wasnt getting anything ... i came accrosss ur channel and now im confident abt this topic ...thank you sir soo much

  • @compilerrun5516
    @compilerrun5516 4 года назад +16

    This man is really a legend.

  • @7franky7777
    @7franky7777 10 месяцев назад

    Legend for a reason ⭐.Still can't forget how easily you taught N queen problem

  • @hassankarim7084
    @hassankarim7084 6 лет назад +6

    Thanks Dr. Bari! Worth noting for search engines, his is also known as a FRACTIONAL Knapsack Problem, or Container Loading problem with divisible payloads

  • @onepiecebts3472
    @onepiecebts3472 5 лет назад

    Every csit 5th sem students of nepal are grateful to you now

  • @saikiranbandla1804
    @saikiranbandla1804 4 года назад +5

    The final answer is 55.3, not 54.6
    any way ur explanation is great. thank you

  • @psingh4851
    @psingh4851 4 года назад

    Abdul bari sir aapne har lectures mai har topic ko bahut hi easy way mai samjhane ki kosis ki hai.ab isse jyada toh easy teaching aur kya ho sakti hai.that's not your problem, that's student problem.aapne apna karya bakhubi kiya hai.

  • @houghtonabhi
    @houghtonabhi Год назад +41

    I think there is a slight calculation error at 06:40 & 12:36min., 5/3 is 1.6, so the final profit is 55.34
    btw before commenting I calculate over 10 times😂
    Thank you so much sir🙏

    • @priyanshuawasthi1061
      @priyanshuawasthi1061 Год назад +1

      Exactly i also calculated many times.

    • @Ringtone4youu
      @Ringtone4youu Год назад +1

      i thought it should be 55.2(mind calculation) but after i used my calculator it said, 55.33333..... that is 55.34 which is correct

    • @houghtonabhi
      @houghtonabhi Год назад +1

      @@Ringtone4youu Exactly

    • @MuhammadIrfan-cj1cq
      @MuhammadIrfan-cj1cq Год назад +2

      broo i thot how come i cant even calculate this simple math hahha ,my whole engineering is a lie ;)

    • @ris99
      @ris99 Год назад +1

      thnks

  • @sufiyanbachla9289
    @sufiyanbachla9289 5 лет назад +1

    یہ تو عبدالباری ہے ،یہ تو اچھا بچہ ہے ، یہ الگورتھم سکھاتا ہے ، اچھی باتیں کرتا ہے .❤

  • @goneraone1988
    @goneraone1988 3 года назад +4

    More power to you Sir. You have made this subject easy for us. Never realised that such subjects can be understood at one go. 🙏

  • @PraveenKumar-ye1mm
    @PraveenKumar-ye1mm Год назад

    Follow Prof.Abdul bari blindly then it seems to be very easy. Sir your explanation is very good and understandable . Thankyou sir

  • @explorewithsingh98
    @explorewithsingh98 6 лет назад +15

    The way u teach us is really great - Thanks Sir g

  • @varunreddy3873
    @varunreddy3873 4 года назад

    u are the leading teacher in youtube regarding to topic algorithms

  • @srinivb1
    @srinivb1 6 лет назад +7

    Sir, Thank you again for such awesome videos on Data Structures and Algorithms 🙏
    Your videos are very clear and easy to follow.
    DSA subject is becoming my favorite subject because of your wonderful videos. Many Thanks 🙏

  • @AlanWalkerIndia
    @AlanWalkerIndia 3 месяца назад

    Tomorrow is my exam and I understood those topics within a few mins, which I couldnt understand in class all these days. Thank you sir 🙏❤

  • @rajakunalpandit3594
    @rajakunalpandit3594 3 года назад +4

    Happy teacher's day sir 🎉

    • @abdul_bari
      @abdul_bari  3 года назад +2

      Thanks Krishna.

    • @rajakunalpandit3594
      @rajakunalpandit3594 3 года назад +1

      @@abdul_bari love you sir, you are the only reason of mine to continue DSA ❤️❤️❤️❤️❤️❤️❤️❤️❤️

  • @MultiPleaser
    @MultiPleaser Год назад

    I was going to make a video showing this method, because nobody had mentioned it yet. They all had super complicated algorithms that boggled the mind.
    Glad someone already figured out this method (it's the best), and now I don't have to make a video. Thanks!

  • @Jerryt.c
    @Jerryt.c 4 месяца назад +9

    End Semester Examination 💀

  • @teacookietaekooki8432
    @teacookietaekooki8432 Год назад +1

    Tomorrow I have exam and today I have only this channel

  • @vaibhavjain2826
    @vaibhavjain2826 6 лет назад +5

    Sir, a big thanks for uploading this playlist! You have explained a theoretical subject in a very logical manner.

  • @Sidgo007
    @Sidgo007 8 месяцев назад

    Watching this before exam gave me chills.. like i am so happy that i can score well now in exam... thank you sir

  • @palthypraveen6633
    @palthypraveen6633 3 года назад +9

    Sir.. 5/3=1.6

  • @faisal_shamim
    @faisal_shamim Год назад

    Your teaching style is the algorithm to my confusion.
    😊

  • @southtowndunky8882
    @southtowndunky8882 3 года назад +15

    Even if i quit studies pretty sure i'll remember him till the day i die :'3

  • @jacquelinemartinez3485
    @jacquelinemartinez3485 2 месяца назад +1

    Thank youuu! Sir. You are like an angel-an algorithmic angel.

  • @manisht5776
    @manisht5776 3 года назад +6

    I know just thank you is not enough for this. But still thank you sir. I feel like cheated by the college they took so much fee and taught me nothing. All they taught me is to mug up.

  • @gaurikale6404
    @gaurikale6404 3 года назад +1

    My friend suggest this channel..and its really helpful...🌟U r really legend sir❤️💯Thanks a lot

  • @syedriyaz3227
    @syedriyaz3227 5 лет назад +7

    Jazakhallahu Khair sir cleared my subject just because of u,❤️❤️

  • @poojitha4683
    @poojitha4683 3 года назад +1

    Sir, You are the only choice for my exams More than books..Thankyou sir

  • @pradipnitw
    @pradipnitw 6 лет назад +6

    this is awesome.. Sir I would request you to give us a snapshot of how we would code it.. even a psedo code would help a lot.

  • @karansolanki3852
    @karansolanki3852 6 лет назад

    Keep it sir ur doing a great job pura saal padae nahi kiya tho apke lectr sunkr thoda bhot tho aata hai ab tysm

  • @shireenkhan7569
    @shireenkhan7569 6 лет назад +9

    max profit will be 55.33 not what you mentioned!!
    well explained!!

  • @bancheth_brro
    @bancheth_brro 11 месяцев назад

    Im watching this in the morning of exam .. and I get it very clearly sir.... thank you a lot...❤

  • @TridibSamanta
    @TridibSamanta 5 лет назад +6

    Great ! You are a great Teacher. Thanks for saving my Design and analysis of Algorithm Paper.
    #Respect

  • @mohammadfarhad3167
    @mohammadfarhad3167 2 года назад

    A very smart & good teacher I see. Smartly explain all things so that it assume easy to us. Avery big thanx sir.

  • @AliHaseni20
    @AliHaseni20 5 месяцев назад +4

    lets see if the question will be in my exam after 2 hours .
    05.29.2024 8:33 AM

  • @han_4706
    @han_4706 2 года назад +2

    I just finish my algorithm course in collage and I got (A) thnks aloooooot abdul Bari😍❤❤

  • @sanusingh4192
    @sanusingh4192 6 лет назад +3

    you are a great teacher,thank you very much,keep uploading such videos

  • @shahildx3163
    @shahildx3163 5 лет назад +1

    Pure teaching... You're the epitome of teaching

  • @upendrakushwaha5123
    @upendrakushwaha5123 6 лет назад +4

    Excellent explanation ,thanks for such a helpful video

  • @j_ourney25
    @j_ourney25 Год назад +1

    The method we follow is best one == The teacher we follow is best one

  • @moustafah1
    @moustafah1 5 лет назад +3

    Hello Sir,
    First, Thank you from Sweden for this perfect explanation.
    Can you please give an exchange argument to prove the correctness?
    Or is there a video about that ?

    • @moustafah1
      @moustafah1 5 лет назад

      I actually have a counterexample, can I get in contact with you please?

  • @mazharbukhari786
    @mazharbukhari786 3 года назад

    Sir, your success is that you teach correct, first you teach yourself in practice then you teach us and what you telo, you perform.

  • @BHASKAR-JHA
    @BHASKAR-JHA 5 месяцев назад +4

    Sir uses Buks when it was not a things😅

  • @siamrahman1409
    @siamrahman1409 3 года назад +1

    I owe my marks to this man. He is truly a gift sent from God, his teaching methodologies are wonderful.
    I've received A / A+'s in all my computer science course and I owe it to you.
    Now i'm preparing for interviews at Google, Amazon and Uber and his videos are amazing refreshers. Thank you.

    • @RC_1930
      @RC_1930 3 года назад

      Did you used his Udemy courses also ? I'm at the beginning and just want to know more.

    • @siamrahman1409
      @siamrahman1409 3 года назад +2

      @@RC_1930 Nope, just watched his tutorials on RUclips. They're incredibly good. I learn 2 weeks worth of content in 2 hours.

    • @RC_1930
      @RC_1930 3 года назад

      @@siamrahman1409 to support him I bought udemy course and I couldn't be more happy, it's amazing

  • @mahmoodkashmiri
    @mahmoodkashmiri 6 лет назад +5

    Love from Kashmir
    Thanks sir

  • @eokdev
    @eokdev 2 года назад +1

    Understandable teaching... Thank you

  • @djBC10000
    @djBC10000 5 лет назад +51

    The error is happening when he divides 5/3, he wrote 1.3 when it is 1.6, so all of the calculations that follow will be off

    • @kirankamath5891
      @kirankamath5891 4 года назад

      exactly

    • @sneiLF4
      @sneiLF4 4 года назад

      1.7

    • @samboy05
      @samboy05 4 года назад +15

      doesn't matter - he is trying to teach the thought process not the exact solution

    • @roushangiri4722
      @roushangiri4722 4 года назад +3

      He did mention in the annotation about it.

    • @prashantgupta6885
      @prashantgupta6885 4 года назад +10

      The error is with our education...soo obsessed with the calculation and not the concept...computers are there, testers are there...dont worry...what matters is you to solve a program like this as a developer...you can debug things anytime

  • @surajdevere5650
    @surajdevere5650 2 года назад

    Today I wasted more than 2 hours somewhere just to understand this problem. But I understand this problem here in just 15mins. thank you, Sir @Abdul Bari

  • @jayantasamaddar1446
    @jayantasamaddar1446 2 года назад +7

    There's a small calculation mistake (human error). The total profit is 55.333333333333336. The error is around the calculation of 2/3*5. By mistake Prof. Bari has instead used the profit by weight as 1.3. It's 1.6666666666666667.

  • @Coolboi7-b1w
    @Coolboi7-b1w 7 месяцев назад +1

    Best Teacher of Algo

  • @robinkumar9021
    @robinkumar9021 5 лет назад +4

    thank you for your video ,sir

  • @nasratullahparwat4606
    @nasratullahparwat4606 4 года назад +2

    Thanks a lot Sir You make it so easy for me
    lots of love from afghanistan

  • @AskarAlmazovich
    @AskarAlmazovich 6 лет назад +9

    I think 2/3* 5 =3.3 but not 1.3 right? o_O

  • @TheSimojamal
    @TheSimojamal 5 лет назад +2

    I'm having an exam in 30min so i'm playing this 1.5x . Thanks for the videos man!

  • @pearlminestudios7568
    @pearlminestudios7568 6 лет назад +4

    7kg washing machine😂.. it’s just funny when I imagine cutting the washing machine to fill the bag.

  • @tahmidgalib5427
    @tahmidgalib5427 11 месяцев назад

    He teaches better than my professors for free!

  • @redherring9727
    @redherring9727 3 года назад +3

    Why can't you be my professor instead :(

  • @sathishauit
    @sathishauit 3 года назад

    Fantastic video. i didn't know what is Knapsack problem in my college days. But i wrote answer with my own algorithm.

  • @loginid7108
    @loginid7108 6 лет назад +6

    ╬ such professional way for teaching ╬

  • @nehanthreddy864
    @nehanthreddy864 Год назад +1

    One of the best lectures I have heard and enjoyed

  • @saisky4392
    @saisky4392 6 лет назад +3

    its an awesome teaching tku MR>ABDULBARI

  • @suberkumarrath2350
    @suberkumarrath2350 2 года назад +1

    I didn't listen to class,exams are next week.
    I understood this clearly.
    May Shree Ram keep you blesses.

  • @aryanjain
    @aryanjain 7 месяцев назад +4

    Watching in March 2024

  • @Myworld-nc8wc
    @Myworld-nc8wc 2 месяца назад

    i am watching in 2024 still the quality of content doesnt match anyone.abdul bari The legend

  • @VikasVerma-px3sl
    @VikasVerma-px3sl 4 года назад +3

    "Write a non-deterministic knapsack algorithm"
    Sir help
    Or anyone help me in this problem some hint about this problem
    Please

  • @mamunmahmudove157
    @mamunmahmudove157 3 года назад

    Best Knapsack problem explained video ever, sir.

  • @manisharastogi2459
    @manisharastogi2459 6 лет назад +5

    Awesome

  • @amitkumargupta6722
    @amitkumargupta6722 3 года назад +1

    correction 5/3=1.67 instead of 1.3
    By the way it was great explanation.....