Bro Just I felt love with ur teaching u know. After stiver I felt like u are the most adorable teacher I have ever seen .
@vinitkeshri99384 ай бұрын
This was today's daily. Thanks !!
@pushpamudalkar67563 ай бұрын
best explanation for this question.
@Antinormanisto4 ай бұрын
Thanks, but I have a problem. I understand all of this except finding baliKaBrakra
@IK-xk7ex6 ай бұрын
unbelievable! how I can come up with the solution by myself :/ ?
@PramodKumar-bu2uf6 ай бұрын
Amazing explaination , very amazing logic , ❤❤
@asmitdixit57763 ай бұрын
wonderfull approach and explaination ❤
@princenagar16863 ай бұрын
This was totally a Math question for Olympiads, this question can never come in interviews. That's what i found, even thought i understand the code and you explanation but I am not going to submit it on Leetcode because i never going to get the intuition of this solution by my own. But thanks for explanation.
@ManishKumar-hh6bf3 ай бұрын
Hi great content .. have wached a lot of your videos ... great help... just a little feedback .. videos are really long I mean explaination is bit slower ..even 1.5X seems slow ... can improve on less repetition
@Munchen8883 ай бұрын
Thank you for good explanation and good mood ))
@Anonymous____________A7215 ай бұрын
Oh my god Edges vector is not required at all💀💀💀💀💀💀💀 Tree->normal array
@b3njamMMVII4 ай бұрын
very good explanation, thank you :)
@SweetRainbow-zg4wv6 ай бұрын
Very good explanation sir🎉
@kavangondalia6884 ай бұрын
How can you be sure that the sacrifice made is good? I meant that what if the odd one (the one for which we're finding a pair) which increases the result by "x" is less than the baliKaBakra (value by which the result decreases)? In that case, it would be good if we don't increase that odd one.
@PriyanshuSinha-vd7yo4 ай бұрын
Great solution aryan!
@SD-vk3ko4 ай бұрын
Awesome Explanation Aryan
@ARYANMITTAL4 ай бұрын
Glad it helped 🫂❤️
@namandubey83484 ай бұрын
Nice video man very good video
@dewanandkumar85893 ай бұрын
Understood
@a.saikumar99063 ай бұрын
@kavangondalia688 already rasised this question. now are contributing nodes are odd and how can u judge that balikabakra leaving is always a good one. There is the possibility that balikabakra lets say it has node value 9 and it increases to 15 and if we take a node which is original 7 and for some k it decreases to 5 in this case simply leaving the node 9 is not good right
@princenagar16863 ай бұрын
So edges has no role to play in this question, that was given redundantly to us.
@vanshmotwani26106 ай бұрын
Great explanation bro! Keep it up :)
@abhishekgoudah60156 ай бұрын
Subscribed seeing Bali Ka Bakra usage
@hxgaming88866 ай бұрын
awesome bro
@it-041-satheeshkumar.k73 ай бұрын
what is the use of the edges in the problem? you haven't used it anywhere.
@ankitsahu23056 ай бұрын
class Solution { public: long long solveRec(vector &nums, int k, vector &edges, int idx, vector &dp) { int n = edges.size(); if (idx >= n) { long long temp = 0; for (int x : nums) temp += (long long)x; return temp; } if (dp[idx] != -1) return dp[idx]; int iZero = nums[edges[idx][0]]; int iOne = nums[edges[idx][1]]; nums[edges[idx][0]] ^= k; nums[edges[idx][1]] ^= k; long long l = solveRec(nums, k, edges, idx + 1, dp); nums[edges[idx][0]] = iZero; nums[edges[idx][1]] = iOne; long long r = solveRec(nums, k, edges, idx + 1, dp); dp[idx] = max(l, r); return dp[idx]; } long long maximumValueSum(vector &nums, int k, vector &edges) { int n = edges.size(); vector dp(n, -1); return solveRec(nums, k, edges, 0, dp); } }; Bro why this solution does not work? It is giving correct answer without optimisation, but as i optimise, it is giving wrong answer?
@selfgrowthsigma3 ай бұрын
you're changing nums also and not considering that nums is also changed same i can be visited with different values present in nums so you're limiting all possible solution(recursive calls)
@nagasrisaichaitanyakolluri81734 ай бұрын
🎉🎉
@_ShreyanshAgrawal6 ай бұрын
What is your rank ?? In today contest ??
@giridharanpasupathi6 ай бұрын
Bro contest upsolving pls ❤
@ARYANMITTAL6 ай бұрын
All problems coming sir ❤️❤️🫡
@asmitshukla46493 ай бұрын
ghanta samajh ni aya kuch
@025-harshbindal74 ай бұрын
bhai yaarr tu acting bhut karta hai😮💨
@rockerzgaming7104 ай бұрын
bhai mehnat to kar raha h lekin samjh nhi aa rahe tumhare samjhae soln