TLE 12.0 - our Competitive Programming course TLE 12.0 is live! Enrol now at www.tle-eliminators.com Please fill the Feedback form for PCD: forms.gle/7JimWXwwMxvtiZYU7
i was able to solve the first two exactly like you in the contest but for the third i was stuck at memory limit exceed, anyways great explanation thanks
Awesome video! Actually, I was asked the 2nd question of this contest in one of the interview a month back. And the 3rd question was asked as a follow up. I was able to get to the solution for both the questions. I have 1 doubt, my interviewer was asking me to get to a TC O(N) and SC O(1) solution for the 2nd question of the interview. Is that really possible? Let's say using the input would not be counted as extra space, but still I am unable to find such a solution. in the interview I just said that instead of incrementing the left boundary and decrementing the right boundary in diff array, what if we do the opposite, we decrement the left and increment the right boundary and after taking the prefix sum, we check if each element is
TLE 12.0 - our Competitive Programming course TLE 12.0 is live!
Enrol now at www.tle-eliminators.com
Please fill the Feedback form for PCD: forms.gle/7JimWXwwMxvtiZYU7
The algo for the 2nd problem is really something.... thanks
Got to learn something new today! thanks Viraj and TLE Eliminators!
Please Upload Solution of icpc preliminary
Very clear explanation.Thanks for making this video
Sir How did u come up with 4th solution...So complexx ?? What all u practiced before?
Great Solution Bhaiya
Specially for the last one.......
Great Explanation
Loved the Explaination
Where's div3 and codechef editorial?
Pls upload codeshef editorial
i was able to solve the first two exactly like you in the contest but for the third i was stuck at memory limit exceed, anyways great explanation thanks
The code for 4th problem is now failing for this testcase, so something wrong with the approach?
[2,-1,4,-1,-1,6]
Output:
2
Expected:
1
Updated the problem in description.
The last problem solution is not getting accepted in LeetCode.
Updated the problem in description.
good explanatiohn
Will this sweep line work if we have to take xor rather than decrementing.
It should.
It should.
Pls upload solutions for Codeforces 988 div 3
Awesome video!
Actually, I was asked the 2nd question of this contest in one of the interview a month back. And the 3rd question was asked as a follow up. I was able to get to the solution for both the questions.
I have 1 doubt, my interviewer was asking me to get to a TC O(N) and SC O(1) solution for the 2nd question of the interview. Is that really possible? Let's say using the input would not be counted as extra space, but still I am unable to find such a solution.
in the interview I just said that instead of incrementing the left boundary and decrementing the right boundary in diff array, what if we do the opposite, we decrement the left and increment the right boundary and after taking the prefix sum, we check if each element is
Not sure if LC 3rd problem can be done better than O(nlogn)
Yes, it is possible.
There is a fault in your code for the 4th question . Leetcode added one more edge case "2,-1,4,-1,-1,6" and will be 1 and sir your code gives us 2 .
Updated the problem in description.
you are prioritizing setting X based on an assumption that nums array is in ascending order?
But how is it working for random array, with no order?