it is really wonderful to note that despite the case he has made more than 20 videos till yet he still continues to explain everything down to its finest detail so that his student don't lose track of the whole process of solving the question.... KUDOS to such a teacher. really grateful to have you
Bhaiya Never seen Sucha deidicated person like you in my entire life. Because of You I am going to complete DSA in my 3rd Sem only I really appreciate your hardwork. Consistency++ Hardwork++ Dedication++
Maza aaya bhaiya. after recurrence relation, i did all by myself. Thank you so much for the prev lecture subset problem in recursion section. It is possible only when we follow your way of converting with step by step procedure. pehle DP se dartha tha. ab tho kud hi sab kar raha hun al bec of you bhaiya, dil se dhanyavaad. SUBSET means Inlude/Exclude logic remember the pattern.
bhaiya pehle mai ...pura code khud se nai likh pata tha ......matlb rec se leke pura space opti. tak...but abhi about 70% of the full code khud se kr leta hu......ha thoda logic building me problem hota hai....kyunki abhi sikh raha hu.....but baki ka 30% logic dekhna pdta hai......aur thoda top down se bottom up pe aane me jo loop traversal ko change krna pdta hai, usme thoda prblm hota hai...baki ka kud se ho jata hai........thanks bhiya
in the bottom-up DP, in solveTab() functioon you could have passed target instead of total and make the dp array of target columns by which you would make half less columns. By this approach only the if condition ending condition will change. Here is the code : int solveTab(int N, int arr[], int t){ // Step 1 : Create dp array // while doing dp[index+1] for index = N-1 case, the index can go out of bound // Hence make it N+1 rows vector dp(N+1, vector (t+1, 0)); // Step 2 : Handle base cases // Need to store 1 wherever target == 1 // go till i
AWESOME CONTENT BHAIYA WATCHED EVERY VIDEO OF YOURS AND TH EXPLANATION IS TOP NOTCH. CAN YOU PLEASE MAKE A SIMILAR PLACEMENT PREARATORY COURSE ON SYSTEM DESIGN PLEASE!!
I have a doubt, what if the sum gets 0 only after the use of last index element. in that case this code might fail. because we will be checking the sum as 0 only in the next recursive call, which will be out of bound. So sum == 0's case should be kept before out of bound check to make it work.
Thank you very much. One help, is subtitles not available for your video, I can understand most of the part it would be great if subtitle be available.
it is really wonderful to note that despite the case he has made more than 20 videos till yet he still continues to explain everything down to its finest detail so that his student don't lose track of the whole process of solving the question.... KUDOS to such a teacher. really grateful to have you
case??
Thank you sir understood everything in this video .
Maza aa gaya
Consistency++
yes watch every video from 1 to 123 till end feedback of course is Awesome Course of DSA Thank you
Bhaiya Never seen Sucha deidicated person like you in my entire life.
Because of You I am going to complete DSA in my 3rd Sem only I really appreciate your hardwork.
Consistency++ Hardwork++ Dedication++
What a Ecellent work. You are just amazing person
You are just amazing person. Doing a great job 👍. We all are grateful to you
Bhaiya finally I was able to convert Memoization code into DP myself without looking .Took practice but I am getting in the groove
This is really great playlist for DSA. I never started DSA in my entire life but after going through this playlist I have more interest now doing DSA.
Crystal clear brother, thanks for all the effort you are putting to make many people's lives easier and happy.
Love you Bhai..
Those last lines are MOTIVATION💥...
i have literally started enjoying DP now.
Thank you Bhaiya
Maza aaya bhaiya. after recurrence relation, i did all by myself. Thank you so much for the prev lecture subset problem in recursion section.
It is possible only when we follow your way of converting with step by step procedure.
pehle DP se dartha tha. ab tho kud hi sab kar raha hun al bec of you bhaiya, dil se dhanyavaad.
SUBSET means Inlude/Exclude logic remember the pattern.
Don't worry . we are with you bhaiya . Completed 123 lecture today with my own all handwritten notes 0 to 123.
can u please , if possible , share the notes with me 🤝🙏
bhaiya pehle mai ...pura code khud se nai likh pata tha ......matlb rec se leke pura space opti. tak...but abhi about 70% of the full code khud se kr leta hu......ha thoda logic building me problem hota hai....kyunki abhi sikh raha hu.....but baki ka 30% logic dekhna pdta hai......aur thoda top down se bottom up pe aane me jo loop traversal ko change krna pdta hai, usme thoda prblm hota hai...baki ka kud se ho jata hai........thanks bhiya
best dsa playlist ever all concepts are explained in detail and in the best way
in the bottom-up DP, in solveTab() functioon you could have passed target instead of total and make the dp array of target columns by which you would make half less columns. By this approach only the if condition ending condition will change. Here is the code :
int solveTab(int N, int arr[], int t){
// Step 1 : Create dp array
// while doing dp[index+1] for index = N-1 case, the index can go out of bound
// Hence make it N+1 rows
vector dp(N+1, vector (t+1, 0));
// Step 2 : Handle base cases
// Need to store 1 wherever target == 1
// go till i
AWESOME CONTENT BHAIYA
WATCHED EVERY VIDEO OF YOURS AND TH EXPLANATION IS TOP NOTCH.
CAN YOU PLEASE MAKE A SIMILAR PLACEMENT PREARATORY COURSE ON SYSTEM DESIGN PLEASE!!
Consistency is key bhaiya 🔥🔥🔥❣️❣️❣️😄
You are just amazing person. Doing a great job 👍. We all are grateful to you😃😃
i am understanding this series a little bit but i will still continue it cause ik that next time when i come back here i will understand it fully
Pita ji bhut badi baat kahi hai bhaiya
Very nice solution bhaiya....Great work!! hats off to you
consistency++++ bhaiya quality kam mat karna, enjoying this placement series
thank you bhayia mehnat aapki aur fal hamara
This is 1 d dp problem , target paramter is changing . it works.
Awesome bhaiya
And galtioo si hi sikhne mein maaza aata hai...
What started must end ❤
we are always be with you bhyiaa..keep it up
gajab approach
// COMPLETE CODE WITH COMMENT
class Solution{
public:
bool solve(int target, int index, int arr[], int N)
{
// Base Case
if(index >= N)
return 0;
if(target < 0)
return 0;
if(target == 0)
return 1;
bool include = solve(target - arr[index], index+1, arr, N);
bool exclude = solve(target - 0, index+1, arr, N);
return (include or exclude);
}
bool solveMem(int target, int index, int arr[], int N, vector &dp)
{
// Base Case
if(index >= N)
return 0;
if(target < 0)
return 0;
if(target == 0)
return 1;
if(dp[index][target] != -1)
return dp[index][target];
bool include = solveMem(target - arr[index], index+1, arr, N, dp);
bool exclude = solveMem(target - 0, index+1, arr, N, dp);
return dp[index][target] = (include or exclude);
}
bool solveTab(int total, int arr[], int N)
{
vector dp(N+1, vector (total+1, 0));
for(int i=0; i= 0; index--){
for(int target = 0; target =0)
include = dp[index+1][target - arr[index]];
bool exclude = dp[index+1][target - 0];
dp[index][target] = (include or exclude);
}
}
return dp[0][total/2];
}
bool solveSpaceOP(int total, int arr[], int N)
{
vector curr(total/2 +1);
vector next(total/2 +1);
curr[0] = 1;
next[0] = 1;
for(int index = N-1; index >= 0; index--){
for(int target = 0; target =0)
include = next[target - arr[index]];
bool exclude = next[target - 0];
curr[target] = (include or exclude);
}
next = curr;
}
return next[total/2];
}
int equalPartition(int N, int arr[])
{
int total = 0;
for(int i=0; i
thank you bro
best video lecture series ever!!!!
very good explanation.thank you
loved the explaination🙂☺
Aaa aaa gaya re samj me re thanks bahiiya re🎉🎉
We are all with u
Consistency+++
SIR MAZZA AA GYA
thank you bhaiya
samagh aa gaya bhaiya
Thanks!
Loving the series ❤️❤️❤️❤️❤️❤️❤️❤️
Amazing video
mazza aa gya bhaiya hardWork++;
waah bhaiya maza aa gaya😀
superb
Thank you for great content ❤
babbar bhaiya, you changed life. The coder version of Eminem we needed to bring ourselves out of shitholes.
THANK YOU BHAIYA
Thanks ❤
bhot maza aaraha hai mereko
pita ji sahi kahe....
mazza aya
You are doing good job sir.
Last Line Nailed it... mard ki zubaaan
maza aa gaya bhaiya
Thank you❤ bhaiya🥰🥰
Alakh Pandey of College❤
Understood❤
you are gem. bhaiya
Best content sir ❤
Nice content bhaiya 😊😊
samajh aa gaya sir!
maja aagya
Amazing bhaiya ❤❤
Do your best
Hope you reach your dreams soon.
achi video thi , ab to itni aadat ho gyi hai ki bina video soln ke question ho jaata hai
Fun ++
❤❤❤
bhaiya lec-65 ke baad ke codes nahi dale please reply🙏
Maza aa gya😄💞💕
CONSISTENCY OP BHAIYA
👍👍👍👍👍
Thanks a lot bhaiya
Awesome!
I have a doubt, what if the sum gets 0 only after the use of last index element. in that case this code might fail. because we will be checking the sum as 0 only in the next recursive call, which will be out of bound. So sum == 0's case should be kept before out of bound check to make it work.
samjh mein aaya
131 ✅completed 👍Liked 07:31
Thank you very much. One help, is subtitles not available for your video, I can understand most of the part it would be great if subtitle be available.
maja aaya
we are with you🤎
Besttttt
Maza from Day1
Loved it 🔥
thanku sir
thanks bhiya!
Nice video
Maza aa gya++
op bhaiya
moj kr di
satisfaction++
Thank u so much
Thank you bhaiya😇
Maza aya ++❤
End dekhe maja++
Thank bro 😊
memoization ki bi zarurat nahi hai :
static boolean helper_rec(int[] arr, int index,int target){
if(target==0){
return true;
}
if(target
nice video😇😇😇
Hi please provide sol for subset sum problem with dp memoization
1st se lekar abhi tak sabka end dekha haa...
Done dana daan✌
Understood