liked this video? Click here / @codebix1096 join our facebook group :- / 258049468776636 problem :- leetcode.com/problems/subsets/ code :- github.com/luckykumardev/leet...
I usually don't comment on videos but I am commenting here (Subscribed also) because the explanation was driven very well and smoothly. just one suggestion for you after each video try to give some idea on space and time complexity.
[[],[1],[2],[1,2],[3],[1,3],[2,3],[1,2,3]] ye exact order laane ke liye kya change karna padta. Not list reverse, in recursion steps. Currently the order is reverse.
This is more of an implementation doubt rather than a logical doubt. Doubt - In getSubsets function inside the base condition if I am doing - res.add(curr) instead of res.add(new ArrayList(curr)) then output is all empty subsets. new ArrayList(curr) should append a new list with all the element of curr list. Why is it different from appending curr list itself?
if we add the current list, and remove the element from current list for backtracking , it will remove the element from the previous added list as well, the same reference of the list will be used and only same data will be appended to the final list again and again.
I don't comment on videos but this one was really well explained. Thanks!
yes
tmkc
I search all over the web for this recursive java solution and you are the only one who explains it.
Why you have written ans.add(new Arraylist(curr));
Why not ans.add(curr);
bht bdiaa bhai bht bht bdiaa great explaination keep going
superb explanation, after watching a ton of videos on this topic, I finally understood it
Thanks
Was searching for this kind of video: explanation as well as code❤️
can u suggest in which video u taught this dfs approach i want to learn how its dfs or any other reference
you can see my DP playlist form there you can get the idea
Great ..explanation
It would be great help if u make such videos on recursion series
Thanks!
best
excellent explanation, did not find better than this anywhere.
keep watching :)
thanks sir great explanation as always
nice video sir
Thank you so much, sir. I am waiting for this video. and nice explanation , sir
Always welcome
that last beat is so load , thanks for your videos..
Very well explained 👍👍👍👍👍
I usually don't comment on videos but I am commenting here (Subscribed also) because the explanation was driven very well and smoothly. just one suggestion for you after each video try to give some idea on space and time complexity.
Awesome, thank you!
Follow our linkedin page for regular updates www.linkedin.com/company/codebix/?viewAsMember=true
What will be the time complexity
Thank you soo much sir I love you
So good.
Shandarr. please make more videos
👍
Great work bro !! Keep it up :)
Thanks 🔥
What's the time and space complexity ? Thank you for the video.
SC O(n), TC O(2^N)
Amazing!
Thanks!
sir hmne duplicates kese handle kiye yha pr
nice explanation sir
Thanks keep watching 😃
cool
Thank you.
Follow our linkedin page for regular updates www.linkedin.com/company/codebix/?viewAsMember=true
Ur video are great
[[],[1],[2],[1,2],[3],[1,3],[2,3],[1,2,3]] ye exact order laane ke liye kya change karna padta. Not list reverse, in recursion steps. Currently the order is reverse.
Apply bfs :)
I mean solve this question iteratively you will get this order
This is more of an implementation doubt rather than a logical doubt.
Doubt -
In getSubsets function inside the base condition if I am doing -
res.add(curr)
instead of res.add(new ArrayList(curr))
then output is all empty subsets.
new ArrayList(curr) should append a new list with all the element of curr list. Why is it different from appending curr list itself?
if we add the current list, and remove the element from current list for backtracking , it will remove the element from the previous added list as well,
the same reference of the list will be used and only same data will be appended to the final list again and again.
@@pawansinghvohra160 thanks a lot