I think the i < len(popped) condition can be omitted ? Because the number of elements we pop is always smaller or equal to the number of elements we push
@tobiichiorigamisan Жыл бұрын
You're right. Even I solved it without that constraint.
@leeroymlg4692 Жыл бұрын
even if there is more popped than pushed, that means we will come across numbers that don't exist in pushed and it will exit out of the while loop anyway
@davidarm86 Жыл бұрын
those daily leetcode solutions are priceless ! Thank you for the wonderful content
@zhethan9908 Жыл бұрын
we making it out of unemployment with this one 🔥🔥🔥
@yoni905 Жыл бұрын
Are you doing these every day?? Dude you are amazing. Really an inspiration.
@shubhammishra1225 Жыл бұрын
I dont think so "i" will be ever greater than len(popped) . Nice sol thanks.
@sauravchandra10 Жыл бұрын
10 seconds in the video and I have already figured out the solution. Dont know how it is possible, maybe it is the calmness with which you approach the problems.
@vixguy Жыл бұрын
wow I wrote the exact code as you!!
@MP-ny3ep Жыл бұрын
Awesome explanation. Thank you !
@krateskim4169 Жыл бұрын
Thank you so much
@mirshodoripov1035 Жыл бұрын
you are genius
@roywastaken Жыл бұрын
maestro
@puneetkumarsingh1484 Жыл бұрын
Can you make a video on solving the variant of this problem with duplicate numbers as well which you highlighted at 3:18? It would be greatly appreciated.
@phoenixninja8872 Жыл бұрын
there's 69 likes on the video... I wanna like it cuz it was a great vid but then it wouldn't have 69 likes anymore. Sticky dilemma :(
@yashjoon3889 Жыл бұрын
Also the acceptance rate for this problem on lc was exact 69% so I didn't wanted to solve the problem in one go :
@julianelmasry9556 Жыл бұрын
first view
@manishcoding5383 Жыл бұрын
@typicalIsraeli Жыл бұрын
It's apparent that lately, you began increasing the video speed (1.25 out-of-box). Both talking & drawing speed don't feel natural. Please let others decide whether they want it to be 1.25 faster or not.