Пікірлер
@sase1017
@sase1017 2 күн бұрын
need to be in-place, so queue is not optimal
@Kaafirpeado54-6ayesha
@Kaafirpeado54-6ayesha 2 күн бұрын
I used to either see solution for backtracking or simply skip Due to my incapability of coping with tedious work of dryrun Now I'm good Thanks to Eric❤ and striver❤
@java_bee3000
@java_bee3000 5 күн бұрын
Love the way , he frames his own test cases and cross check the code
@Kaafirpeado54-6ayesha
@Kaafirpeado54-6ayesha 10 күн бұрын
Just use sort(colours) And thank me later
@Kaafirpeado54-6ayesha
@Kaafirpeado54-6ayesha 12 күн бұрын
I have started seriously doing leet code from August Ill be back and comment back i get a job Unlike @nguyenquoctran8423
@Kaafirpeado54-6ayesha
@Kaafirpeado54-6ayesha 16 күн бұрын
Thanks
@Kaafirpeado54-6ayesha
@Kaafirpeado54-6ayesha 18 күн бұрын
Thank you i learnt sorting 2d arrays while seeing this solution
@Kaafirpeado54-6ayesha
@Kaafirpeado54-6ayesha 19 күн бұрын
Ill do it on my own after 6months lets see if can remember the logic
@Kaafirpeado54-6ayesha
@Kaafirpeado54-6ayesha 19 күн бұрын
Man I want to do these problems on my own😢 You are great btw ❤
@Kaafirpeado54-6ayesha
@Kaafirpeado54-6ayesha 19 күн бұрын
Thanks man
@Kaafirpeado54-6ayesha
@Kaafirpeado54-6ayesha 22 күн бұрын
Thanks ❤ this needs practice and repetition
@Kaafirpeado54-6ayesha
@Kaafirpeado54-6ayesha 23 күн бұрын
I didn't get how second for loop solves the issue that first for loop couldn't solve
@Kaafirpeado54-6ayesha
@Kaafirpeado54-6ayesha 23 күн бұрын
Plz explain if anyone see this comment
@Kaafirpeado54-6ayesha
@Kaafirpeado54-6ayesha 23 күн бұрын
Thanks it helped ❤
@Kaafirpeado54-6ayesha
@Kaafirpeado54-6ayesha 23 күн бұрын
Thanks ❤
@Kaafirpeado54-6ayesha
@Kaafirpeado54-6ayesha 24 күн бұрын
Good explanation mate
@Kaafirpeado54-6ayesha
@Kaafirpeado54-6ayesha 24 күн бұрын
Eric Underrated and so much deserving tutor ❤
@qinyunli152
@qinyunli152 26 күн бұрын
Great explanation!whats tool to draw on the board? Can I add into my interview?
@RandomUser-e5m
@RandomUser-e5m 26 күн бұрын
🎉❤
@RandomUser-e5m
@RandomUser-e5m 26 күн бұрын
❤❤❤
@Kaafirpeado54-6ayesha
@Kaafirpeado54-6ayesha 27 күн бұрын
Thanks eric❤
@Kaafirpeado54-6ayesha
@Kaafirpeado54-6ayesha 27 күн бұрын
Why can't we use Queue<Integer>q=new ArrayList<>(); I do got an error using this line , as soon as I change it to Linkedlist its accepted?
@Kaafirpeado54-6ayesha
@Kaafirpeado54-6ayesha 27 күн бұрын
Thanks a lot ❤
@Kaafirpeado54-6ayesha
@Kaafirpeado54-6ayesha 28 күн бұрын
Premium question ill pass
@prajub99
@prajub99 28 күн бұрын
thank you.. one of the best explanation this is for the problem.
@Kaafirpeado54-6ayesha
@Kaafirpeado54-6ayesha Ай бұрын
Thanks 😊
@Kaafirpeado54-6ayesha
@Kaafirpeado54-6ayesha Ай бұрын
Why its hard to get for the first time
@Kaafirpeado54-6ayesha
@Kaafirpeado54-6ayesha Ай бұрын
I understood the first approach so I skipped second one
@Kaafirpeado54-6ayesha
@Kaafirpeado54-6ayesha Ай бұрын
How to come up with these ideas on my own 😮
@Kaafirpeado54-6ayesha
@Kaafirpeado54-6ayesha Ай бұрын
How to come up with this idea on our own
@AibakShahzad
@AibakShahzad Ай бұрын
Great approach
@Kaafirpeado54-6ayesha
@Kaafirpeado54-6ayesha 16 күн бұрын
Apostate prophet youtube
@Kaafirpeado54-6ayesha
@Kaafirpeado54-6ayesha Ай бұрын
I didn't understand when to reverse and how we applied reverse, on what basis we do reverse,btw there are 2 reverse i understood second one but not 1st
@Kaafirpeado54-6ayesha
@Kaafirpeado54-6ayesha Ай бұрын
Thanks
@Kaafirpeado54-6ayesha
@Kaafirpeado54-6ayesha Ай бұрын
@Kaafirpeado54-6ayesha
@Kaafirpeado54-6ayesha Ай бұрын
Please Make your dsa tutorial public 😢😢
@Kaafirpeado54-6ayesha
@Kaafirpeado54-6ayesha Ай бұрын
Make private videos public
@Kaafirpeado54-6ayesha
@Kaafirpeado54-6ayesha Ай бұрын
Your first solution isn't working
@Kaafirpeado54-6ayesha
@Kaafirpeado54-6ayesha Ай бұрын
Please enable private videos
@Kaafirpeado54-6ayesha
@Kaafirpeado54-6ayesha Ай бұрын
Bro kindly enable to access your dsa tutorials ❤
@Kaafirpeado54-6ayesha
@Kaafirpeado54-6ayesha Ай бұрын
Bro please make your tutorials public
@Kaafirpeado54-6ayesha
@Kaafirpeado54-6ayesha Ай бұрын
Please make you tutorials public
@vaibhavshankarjoshi
@vaibhavshankarjoshi Ай бұрын
can u solve and add 1610 in 2 pointer list and remind me after doing it?
@giteshkhanna2633
@giteshkhanna2633 Ай бұрын
Great explanation.
@justmeagain9302
@justmeagain9302 Ай бұрын
Great explanation!!
@soumyajitchatterjee5822
@soumyajitchatterjee5822 2 ай бұрын
Really good explanation!!!
@ZakiNabeel-x8m
@ZakiNabeel-x8m 2 ай бұрын
Thank you
@Emanuel-yb3qk
@Emanuel-yb3qk 2 ай бұрын
Excellent video, thanks brother.
@AlexN2022
@AlexN2022 2 ай бұрын
in a sequence 3 - 2 - 1, we have calculated the longest subarray starting at "2". But we cannot simply reuse that for 3->2, since the location of the 2' match in the other array may be disconnected from the location of the 3's match.
@Kaafirpeado54-6ayesha
@Kaafirpeado54-6ayesha 2 ай бұрын
Why L+1<R? Ur reason It would be helpful for this community if you switch your algorithms playlists to public, Or i can pay if it's premium
@rachelcarengreen
@rachelcarengreen 2 ай бұрын
Thank you, this helped me come up with the following solution in Javascript /** * @param {string} s * @param {number} numRows * @return {string} */ var convert = function(s, numRows) { if(numRows <= 1) return s; let hashMap = {}; let arrayOfIndexes = []; for(let i = 0; i < numRows; i++) { hashMap[i] = ''; arrayOfIndexes.push(i); } let superCounter = numRows - 1; let down = false; for(let j = 0; j < s.length; j++) { let index; if(j < numRows) { index = j; hashMap[index] += s[j]; continue; } if(down) { superCounter++; hashMap[superCounter] += s[j]; down = superCounter < numRows - 1; continue; } else { superCounter--; hashMap[superCounter] += s[j]; down = superCounter === 0; continue; } } let output = ''; for(h in hashMap) { output += hashMap[h]; } console.log(hashMap, output, 'hashMap'); return output; };
@yaxlu
@yaxlu 2 ай бұрын
This is still one of the best explanation for that's out there for this logic. Thank you for making it.