Leetcode Weekly Contest 404 | Video Solutions - A to D | by Abhinav Kumar | TLE Eliminators
Вставка
- Опубліковано 16 лип 2024
- Here are the video solutions for problems A, B, C, D of Leetcode Weekly Contest 404. We hope this will be useful for you in up-solving this contest.
📢Check out handpicked problems by Priyansh himself, on our CP-31 sheet: www.tle-eliminators.com/cp-sheet
Solution Codes:
Problem 1: leetcode.com/problems/maximum...
Problem 2: leetcode.com/problems/find-th...
Problem 3: leetcode.com/problems/find-th...
Problem 4: leetcode.com/problems/find-mi...
Problem 4(using Re-rooting) : leetcode.com/problems/find-mi...
Be sure to check out TLE Eliminators.
Website: www.tle-eliminators.com/
Instagram: / tle_eliminators
Linkedin: / tle-eliminators
Twitter: / tle_eliminators
TLE Community Discord Server: / discord
Timestamps:-
0:00 Problem A
13:30 Problem B
33:39 Problem C
1:09:14 Problem D
Please fill the feedback form: forms.gle/eEietfsYMzQGMeX47
wasted the contest only for problem 1. while reading it felt easy when solving it got me.
Did the same mistake : (
In reality first problem should be marked medium while second problem should be marked easy!
Question 3 very poorly explained. You just went and read the code
Can someone please provide a Recursion + Memoization Code for the third 3rd problem. It would be really helpful!!
u are from strivers A-Z DSA aren't u?
@@omkara477 No bro, just recently started learning Dynamic Programming. Thats why I try to build solution using recursion and memoization first. So please help if you could
Very niceely explained sir thanks
Sir ji plz use a good mic.
47:38
from here it was hard to understand
explanation of 2nd was to the point!
can i know how 2nd qn code handles both the cases of alternating subsequences ,ie starting with even and strting with odd?
Question 3 is really depth of numbers😢f
When the new batch of TLE eliminators will start??
nice explanation
how to think dp states but
Right way yo learning DP can anyone tell?
I was able to write the recursive code for 2nd... But wasn't able to memoise it
can u send me
the recursive code
@@adarshamit3503 class Solution {
public:
int calc(vector&nums,int i,int comp,int k){
if(i == 0) return 0;
//cases
if(k == 2){
int take1 = 1 + calc(nums,i-1,nums[i-1],0);
int take2 = 1 + calc(nums,i-1,nums[i-1],1);
int nott = calc(nums,i-1,0,2);
return max(take1,max(take2,nott));
}
else if((nums[i-1]+comp) % 2 == k){
return 1 + calc(nums,i-1,nums[i-1],k);
}else
return calc(nums,i-1,comp,k);
}
int maximumLength(vector& nums) {
int n = nums.size();
return calc(nums,n,0,2);
}
};
pls improve explination
explanation was very bad...i think you are explaining to someone who had a same thinking like you..but you are explaining to someone who dont understand the logic thats why they came here...
Sir , very nicely and throughly explained . Thanks a lot ❤
3rd question is very poorly explained :(
nice explanation for c
Very bad explanation 👎
Please use a real mic instead of a potato
bro its fine
Maybe u can try using a real headphone instead of a tomato. 🍅
@@NotFound-c2b yo 💀🤣
Great Explanation but bad mic
Bro, can't you speak Hindi? Obviously our national language is Hindi.
You will get more views and more subscribers and more recognition.
Think about it..
bhai kisne bola national lang hindi hai...? Gk bhi nhi jante tm ?
@@vishnuamit7290 National nahi but official language toh hai, bhavana samjho bhai...
@@akashpandit7593 haa..voh toh hai !