I wonder bow beautifully these solutions and problems are designed.its really amazing to link this problem to parenthesis balance. And you explained it in a lit way Santa Sreejith 🎉
Sir, you never check if the stack is already empty when you pop it/access the top. Won't it give runtime error ? (Like in Check Balanced Bracket Problem)
bro, sometimes i keep thinking but the intution doesn't strike and at last i have to see the solution. How can it happen that i am able to solve questions myself??
but that will check that if the stack is empty (in a case where the least value is the r value that come in the first element of the stack then what will happen please someone explain )
I wonder bow beautifully these solutions and problems are designed.its really amazing to link this problem to parenthesis balance. And you explained it in a lit way Santa Sreejith 🎉
Santa Sreejith sounds so cool 😊
Thanks much 🙌
Yeah, the linkage to the balanced paranthesis problem was just awesome.
@@codingdynamo ❤️
Awesome explanations .Thanks Bro.💌
I HAVE STARTED CP AROUND 10 DAYS AGO BUT I AM NOT ABLE TO SOLVE EVEN A SINGLE PROBLEM IN A CONTEST
Same here. I also started a week ago, attempted 4-5 contests, but only solved a single problem in all.
Will take time, once you get a hang on it. You will start solving.
thanks
Split Plus K we want this also.....
I was unable to solve it
Nice 😇
Sir, you never check if the stack is already empty when you pop it/access the top. Won't it give runtime error ? (Like in Check Balanced Bracket Problem)
Good question, as per the constraints we are very sure that there is always an l < r. So it won't go for runtime error.
@@codingdynamo Ah, yes. Thanks Sir :)
@@codingdynamo Sir, will you bring the solutions to D onwards ?
I copied the exact same code and it gave me runtime error and I can't figure out why
Share the submission link
bro, sometimes i keep thinking but the intution doesn't strike and at last i have to see the solution. How can it happen that i am able to solve questions myself??
Everyone faces it, comes with practice
No worries, eventually with constantly giving contests and understanding other's solutions, u will get it.
did you do 4th? if so please make a video. thanks!
Sorry, unable to solve it
but that will check that if the stack is empty (in a case where the least value is the r value that come in the first element of the stack then what will happen please someone explain )
That case would never happen, as per the constraints, there always exists a 'l' which is less than 'r'. So we are sure about it.
i which year are you studying sreejith bro?
I am not a student, I am working for almost 2.5 years 🙂
Thought the same but was not able to implement it because I was thinking about how to identify which is from the left and which is from right vector.
So next time, you gonna code it, if a similar problem comes :)
Yes, thanks a lot@@codingdynamo
Nice cap bruhhh>!
Thank you ✌️