6.2 Sum Of Subsets Problem - Backtracking

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 ส.ค. 2024
  • Sum of Subsets problem
    PATREON : www.patreon.co...
    Courses on Udemy
    ================
    Java Programming
    www.udemy.com/...
    Data Structures using C and C++
    www.udemy.com/...
    C++ Programming
    www.udemy.com/...

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

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

    Excellent sir I slept while my professor was teaching during my online classes but tomorrow I'm having my exam and I am watching your video's it was very helpful

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

      👍🏻👍🏻

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

      Same bro, hope you scored good in your exam

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

      @@srujangurram yeah bro I scored 80 percent in my sem end examination

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

      @@monishpidugu5134 that's awesome ! we have exam tomorrow. hope i does well too 🤞

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

      I read I slept with my professor 🤣

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

    beautifully explained, amazingly clear videography, easily understandable hand writing, simple examples, clear simple English speech so that everyone can understand, slow paced speech so that anyone can grasp the concept, clear audio and the best part is the calm attitude of explanation, just everything that is needed for a perfect explanation, your channel has it.

  • @manish4275
    @manish4275 6 ปีที่แล้ว +417

    Even my professor watches ur videos!
    If she forgets something we say her video is buffering 😂😂

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

      My Professor Watches too but shortly explains algorithm 😂

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

      You got me at "buffering" 😂😂

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

      @@anupriyaranjan8966 Mam aap yaha 😄😀😄😀😄

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

      DEAD

    • @ManishKumar-rz9ub
      @ManishKumar-rz9ub 3 ปีที่แล้ว +3

      Possibly you will get the same question in the exam 😂😂

  • @unscripted_india
    @unscripted_india 6 ปีที่แล้ว +761

    Hit like if you have exams tomorrow and are watching this for end semester.

    • @Pankajkumar-dy9ef
      @Pankajkumar-dy9ef 6 ปีที่แล้ว

      yes

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

      yes bro

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

      Hit like i have exam today 😂😂😂😂

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

      If I watched this as my last resource the day before having an exam, I wouldn't pass anything. It's good to take a first glance, or to break apart a problem and solve it, but not as an academic foundation.
      Step up your game, don't be lazy.

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

      @@carlosgallegos1265well it depends on person to person. I'm used to studying on the last minute and TH-cam videos are my last resort if I don't understand anything from books and Abdul Bari has been like a God to me literally. I wasn't much into algos and I'm really interested to get into this more. The teachers we have are too underpaid and are not as qualified as well as don't have their concepts clear some of the times. Having a community online helps us help one another and get info quickly without looking into 100s of pages lol.

  • @yashspr
    @yashspr 6 ปีที่แล้ว +57

    I have never come across a better teacher than you sir. Hats off!

  • @NguyenTuan-ek1pv
    @NguyenTuan-ek1pv 2 ปีที่แล้ว +17

    The best teacher ever on TH-cam.
    +1 vote!

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

    The way you are explaining the recursion (DFS) is the unique skill you have. I appreciate your time for making this video's. Hope this will helps many people.

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

      does not sound like a compliment

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

      ​@@kurru_kamiz3458why?it did sound like one

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

    This is an excellent explanation for the backtracking technique to solve this problem. An important precision about this approach, that is missing from the video and that may trip up or confuse the problem solver is that the *weights must be positive*. Without this precision, the bounding function doesn't make sense, since at the time we exceed the target sum during traversal, a later negative weight could bring it to target. So this backtracking approach works only if the weights are positive.

  • @alexisxander817
    @alexisxander817 6 ปีที่แล้ว +25

    You are such an amazing teacher; everything you explain is understood by me at once, and I am not even a meritorious student lol...
    thank you

  • @Deepak-jk1eh
    @Deepak-jk1eh 5 ปีที่แล้ว +21

    because of your videos i study only one night before of exam ,you r making every student life very easy by just giving these all videos in free ,so thanks you sir .

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

    Just brilliant, it's a privilege to have a teacher like you.

  • @surajkumar-px5lf
    @surajkumar-px5lf ปีที่แล้ว +5

    I don't go class because I know you will clear my all concept before exam. My teacher also made pdf from your lecture's screenshot. You are truly amazing. Sir

  • @visakh_vijayakumar_
    @visakh_vijayakumar_ 6 ปีที่แล้ว +8

    thanks :) only suggestion is @ 6 : 40 it is 27 + 15 =42 ..

  • @XYZ-nz5gm
    @XYZ-nz5gm 2 ปีที่แล้ว +2

    not many people can explain this well even though they understand inside out. You did a really good job!

  • @MBindu-kc2nj
    @MBindu-kc2nj 2 ปีที่แล้ว +1

    Very helpful sir thank you.
    Initially I thought your videos are too lengthy but now I realized your way of teaching is the best.

  • @f4lld4ark3
    @f4lld4ark3 6 ปีที่แล้ว +20

    Best video professor, much hq quality, very nice kanimambo

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

    the way of teaching is so unique. awesome content sir.

  • @ShubhamKumar-wq9kw
    @ShubhamKumar-wq9kw 6 ปีที่แล้ว +81

    content is good...including pseudocode explaination would be really helpful

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

      +1

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

      Sir have already explained how to solve the problem. Now it's your task of solving the whole problem.

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

    Thanks Abdul! Very clear walkthrough of backtracking! It helped me greatly. LOL at the inconsequential arithmetic mistake at 6:39! ;) just shows you're human!

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

      I also notice.

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

      yeah, noticed as well :D

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

    1day before Sem

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

    Thankyou so much sir !!!!!
    The way you explained was way more better than any teacher I've came across.

  • @FaKe-rq7cu
    @FaKe-rq7cu 4 ปีที่แล้ว +30

    Very good explanation. I had a little doubt, at 8:18 shouldn't it be greater than or equal to 'm' instead of greater than 'm' in 2nd bounding function. Eg if arr = [1,2,3] & sum = 6, then after including 1 ( [1,5] ), the 2nd bounding function will not let it go further (even though taking all elements would have generated the sum).

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

      Yeah, It seems so. Should have been ≥ m.

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

      The 2nd bounding function is correct. It should be greater than m. You only apply the 2nd bounding function when descending down the right branch. When you descend down the right branch, it means that x[i]=0. In your example, after [1,5] and descending down the right branch x[2]=0 which means that 2 will not be included in the solution. The 2nd bounding function is telling you that you will not have enough values to reach the sum 'm' because the values going down the right branch will not be included in the solution. So for arr[1,2,3] and m=6, after taking 1 but not taking 2, you can't reach the value m=6.

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

      No because if the rest of the weights can't add up to the number you are searching for then why continue? If the sum of your current sum plus the rest of the objects are less than that number then you'll never get it, so you stop.

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

    Very good video. I want to add an improvement to this backtracking. You can add another bonding function, if w array is sorted ascending so X_(i-1) < X_i < X_(i+1) then you know if adding X_i is already greater than m then you kill the node and it's brothers because X_i+1 > X_i

    • @SahdevSingh-io3qp
      @SahdevSingh-io3qp 7 หลายเดือนก่อน

      But sorting also takes some time O(nlogn) and here you are taking time to reduce time, which is meaningless

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

    You deserve all my respect sir , such a great teacher i wish you all the best

  • @-PriyankaReddy-tk5ti
    @-PriyankaReddy-tk5ti 5 ปีที่แล้ว +24

    Seriously ... my professor given same example...I think she watches ur vedios 😂😂😂😅

  • @exe.m1dn1ght
    @exe.m1dn1ght 4 หลายเดือนก่อน +1

    I love Abdul so much ! The way he explains it , calm and cool !! He is a true Master Warrior of Programming !

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

    I was just misunderstanding of something and by seeing this great video all confusions became clear, thank you

  • @M-aggi-e
    @M-aggi-e 6 ปีที่แล้ว +5

    By far the best explanation Sir. Thank you very much.

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

    It may be any tough sum,u make it easier by your explanation 😊

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

    The time complexity for this is still exponential. Consider the case where all of the elements are 1 and the last element is massive. If the target sum is less than the less element but more than all the other elements combined, no nodes are pruned

    • @SahdevSingh-io3qp
      @SahdevSingh-io3qp 7 หลายเดือนก่อน

      See the second bounding condition, if the considered weight + total remaining weight is less than target sum, then no need to search further

    • @SahdevSingh-io3qp
      @SahdevSingh-io3qp 7 หลายเดือนก่อน

      At first call, your example will be terminated

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

    You explained it very well... This video helped me a lot...Thank you so much sir❤🙏

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

    sir, I have been looking for a good explanation for this problem using recursion since long. So far I found people directly starting with DP solutions where they create the DP table. That is just like mugging up. It is not intuitive at all. You can think of it after you have thought of a recursive solution. Atleast that's what I do. Thanks a lot for making this video. You made my day!

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

    Mashallah Sir aap ki class superb...Ur teaching mind-blowing sir 👍

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

      Thanks for liking

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

    Just saw this video on morning of my sem exam for 4 min ,dayumm just helped a lot ,didn't expect they would ask this. Guess im so lucky afterall

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

    what an explaination just outstanding thanku so much sir

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

    How can the value of m remain 33 when we not including 4th object ie x4=0 i think the ans 27,46. correct me if im wrong

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

      Yes bro u are right. That's why i come to the comment section. I am sure any one student are done comment on this silly mistake.

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

      He does the same at 27,18 idk i think that is how you do it.

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

      He is just taking track of remaining weight to become 0, that's why he is decreasing regardless of including or excluding the element

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

      The left part of the node is the sum of all the x you included until now but the right part is the sum of all the remaining x you can add, so the right part changes repeatedly no matter if you include the particular x or not. So when x4 is excluded, the remaining choices you have are just x5 and x6, so sum would be x5 + x6 = 15+18 = 33 not 46. So think of the right part as something that has the sum of the remaining elements after a level you're at. At level x2, the values is x3+x4+.... and at x3 it is x4+x5+.... .

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

    how many of you are watchin 1.5x or 2x hit like here
    kabi kabhi nhi hamesha lagta hai ki sir ich bhagwan hai.... akash gaytunde

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

    Tq u sir it is very useful me because tmr my daa exam tq u so much it is one of the my dout how to solve this but now i know how to subsititute

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

    Thank you so much sir for your videos it ws too good and the way your explaining the concepts are not complicated . It helped me a lot thank you once again.

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

    For benefit of everyone. Here is the manifestation of the concept in code:
    """
    Identify all the subsets of a given set that will
    add upto a given target
    { 5, 10, 12, 13, 15, 18 }, 30 => [{5, 10, 15}, {5, 12, 13}, {12, 18}]
    """
    from typing import List, Set
    def sumOfSubsets(nums: Set[int], target: int):
    def dfs(weights: Set[int]):
    if sum(weights) == target:
    output.append(list(weights))
    other_weights = nums.difference(weights)
    # choose weights in an increasing order to avoid duplication of
    # results
    if len(weights) > 0:
    other_weights = [w for w in other_weights if w > max(weights)]
    for weight in other_weights:
    if sum(weights) + weight

  • @Sourcegameryt.1M
    @Sourcegameryt.1M 29 วันที่ผ่านมา

    Tomorrow is my sem exam😂😂 just one video of this sir is enough to top DAA exam.
    THANK YOU SIR❤❤❤

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

    Sir u will get world's best teaching skills person🙏Award

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

    Ye toh Abdul baari haii ye toh acha bacha haiii, ye duayein sunta haiii, achi baatein batata haii 💆🧘

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

    Great explanation, good example and very easy to follow. I managed to implement and use this very quickly. Thanks a lot!

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

    wonderful teaching sir thank u so much

  • @itsupport8245
    @itsupport8245 6 ปีที่แล้ว +34

    Sir, pls give us code with this problem..

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

    Great explanation, much better than my professor

  • @user-dd4en4jo9e
    @user-dd4en4jo9e 5 หลายเดือนก่อน

    This man is a savior.

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

    NICE METHODS AND WAY OF TEACHING

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

    Save me the day!! I will see you on Udemy

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

    you re the real king, Abdul Bari

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

    Sir, could you make coding videos of these algorithms as well? It would really help us:)

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

    Thn...x for your explanation. Addition or discussion of time and space complexity will make you unique form others.

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

    You take class awesome sir mainly this subset class sir i learn subset sir👌👌👌

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

    Very well explained Abdul

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

    THANK YOU SIR , YOUR EXPLAINATION WAS SO EXCELLENT

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

    best explanation ever , thanks sir

  • @vinayaktulsian6276
    @vinayaktulsian6276 6 ปีที่แล้ว

    Very nice sir thank you for helping us one day before our exam , you teach very well.

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

    Colaboren con este excelentísimo !

  • @hitmandevil6935
    @hitmandevil6935 6 ปีที่แล้ว

    Sir, the way you explain is actually great (it clears the concepts well). But I have a question, how to implement these solutions in a program, how to code these strategies with an efficient implementation. It would be very kind of you if you attach a link in the description (or make some more videos) stating the codes and what's the idea behind its efficient implementation. Thanks in advance....!!!

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

    Thanks for the wonderful videos and It would be really helpful if you include writing code for this kind of DP, Back tracking Problems. May be, by watching your code, most people may get essence of "how to write code" for this kind of problems. My request is to include code for at least one problem of such type as including for all will be hectic.

  • @aadarshkumayan5960
    @aadarshkumayan5960 6 ปีที่แล้ว

    Very informative lecture series for starting with Backtracking

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

    Master of teaching😃

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

    6:32 the given numbers are in descending order. Whats the point of adding 15 (next element )? Can somebody explain

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

    I appreciate ur work sir. You are really amazing. .

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

    Super explanation sir I hope this explanation will make all queries clear

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

    at 6:35 ,, 27+15 = 42 not 43
    😉

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

    Sir ji dhnayaavad bot thanku apkaa. Iss sem ka Daa aap hi nikalonge mera😊

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

    Excellent teaching 😎😎

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

    Even our Daa Sir sent ur videos .don't know why they are getting salary which belongs to you .sir 😢

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

    sir what is the time complexity for this problem? do we consider height as timecomplexity?

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

    thank you so much, sir, your videos are really knowledgeable and helpful.

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

    Thank you sir, I love your explaination😍 just one suggestion keep video time minimum for other video

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

    To understand the algorithm your videos are awesome. But I would suggest if you could please add the pseudocode at least while explaining the algorithm it would been more helpful.

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

    A few questions I had:
    1. Why don't we sort the array?
    2. Does this not work for negative integers?
    3. What is the complexity of this algorithm?
    4. What if we have a list whose sum is 31? Won't that be a worst case scenario as we'll end up iterating through all 2^n possible paths and not find any solution?

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

    Such simple and excellent explaination.

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

    Honestly the best explanation ive found

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

    Video cut at 5:34.

  • @marypulapa3743
    @marypulapa3743 6 ปีที่แล้ว

    Sir outstanding explanation ... Sir really its easy to understand

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

    At 6.17 when we are excluding 4th node then why we are using sum that come when we include the 4th node?

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

      I do have the same doubt ma'am

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

      I know right!!!

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

    thanks sir i have cleared my backlogs

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

    Very nice explanation sir

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

    Thank you soo much for your Explanation sir

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

    crisp and clear explaination

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

    This man is a genius

  • @himanshusingh3056
    @himanshusingh3056 6 ปีที่แล้ว

    Superb Explanation for this problem !

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

    Thanks a lot sir.good explanation.

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

    I have a doubt on that we did not include some items so that y u reduce the total weight from where we did not consider that item

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

    amazing explanation on this!

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

    Amazing explanation! Thank you very much!

  • @mandilal94
    @mandilal94 6 ปีที่แล้ว

    Excellent Teaching sir.Thank you

  • @Manish-xc6is
    @Manish-xc6is 3 ปีที่แล้ว

    Watching these for the third time for my 2nd supplymentary

  • @NIKHIL-nv8wu
    @NIKHIL-nv8wu 5 ปีที่แล้ว

    Thank you sir for good video lecture,I can understand easily

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

    he : I am not the messiah
    us: he is the messiah!

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

    python code::
    l1=[5 , 10 , 12 , 13 , 15 , 18]
    tot_sum=0
    for l in l1:
    tot_sum+=l
    weight_sum=0
    m=30
    sol=0
    def backtrack(weights , index , weight_sum , tot_sum):
    global sol,m
    print(weights , index , weight_sum , tot_sum)
    if weight_sum==m:
    print("yess")
    sol+=1
    return
    if weight_sum>m:
    return
    if index>=len(weights):
    return
    backtrack(weights , index+1 , weight_sum+weights[index] , tot_sum-weights[index])
    backtrack(weights , index+1 , weight_sum , tot_sum-weights[index])
    backtrack(l1 , 0 , 0 , tot_sum)
    print(sol)

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

    Sir please make videos about other core computer science subjects
    Thank you sir great explanation

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

    My exam is today and watching this concept now 😂

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

    sir once came to our college , when i was in second year , hope once agian he will come to for gest lecture on DAA

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

    State-space tree is such an amazing tool. Why haven't I heard about it earlier?

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

    nice explanation sir