Trapping Rainwater Problem | Leetcode | Rain water trapping problem | DSA-One Course #16
Vložit
- čas přidán 14. 03. 2021
- Hey guys, In this video we're going to solve a very famous Leetcode problem known as Rainwater trapping problem.
Solution with O(1) space can be found here: www.techiedelight.com/trappin...
Assignment problems: www.techiedelight.com/Categor...
Follow for updates:
Instagram: / anuj.kumar.sharma
LinkedIn: / anuj-kumar-sharma-2945...
Telegram: t.me/coding_enthusiasts
DSA-One course: • Time Complexity & Big ...
Link to the code: www.geeksforgeeks.org/majorit...
Practice problems: www.interviewbit.com/courses/...
Use #DSAOne to spread knowledge and show your support on LinkedIn, Instagram.
Join the Telegram Group for DSA-One course: t.me/dsa_one
Ignore these tags:
trapping rainwater problem
trapping rain water
trapping rain water problem
trapping rainwater problem leetcode
trapping rainwater
problem solving
trapping rain water leetcode
trapping rainwater leetcode
trapping rainwater leetcode java
trapping the rainwater problem
trapping rain
rain water trapping problem
leetcode trapping rain
rainwater trapping
trapping water problem
rain water problem
trapping rain water problem explanation
rainwater problem
trapping rainwater problem
trapping rain water
trapping rain water problem
problem solving
trapping rain water leetcode
trapping rainwater leetcode
trapping rainwater leetcode java
trapping rainwater problem leetcode
trapping the rainwater problem
trapping rainwater
leetcode trapping rain
trapping rain
rain water trapping problem
trapping rain water problem explanation
rain water problem
rainwater problem
trapping rainwater leetcode python
trapping rainwater problem
trapping rain water
trapping rain water problem
trapping rainwater problem leetcode
trapping rainwater leetcode
trapping rainwater leetcode java
trapping water problem
trapping rainwater
rain water trapping problem
trapping rain water problem explanation
trapping rain water leetcode
rain water trapping problem using stack
trapping rain water solution
rainwater trapping
problem solving
rain water problem
rainwater problem
trapping rain water problem
trapping rain water
rain water trapping problem
trapping rainwater problem
rainwater trapping problem
anuj bhaiya
trapping rainwater
tapping rain water problem
trapping rainwater leetcode
trapping rain water leetcode
rain trapping problem
42. trapping rain water
water trapping problem
container with most water leetcode
container with most water
dsa problem solving
trapping water problem
rain water problem
rain water tapping problem
dsa question
rain water trapped
leetcode 42
dsa
rain water trapping
tapping rainwater
dsa one
rain water
rainwater
anuj bhaiya java
largest rectangle in histogram
leetcode solutions
trapping rain water problem in c++
anuj bhaiya dsa
leetcode
rain water preservation code
rain water trapping problem using stack
rainwater preservation code in java
trap rain water problem
trapping rain water problem in java
trapping rain water problem pepcoding
pepcoding
rain water preservation java code
trapping rainwater problem pepcoding
11. container with most water
data structure
love babbar
rainwater preservation java program
rainwater preservation program in java
tapping rain water
tapping rainwater problem
trapping rain water pepcoding
water trapping
anuj bhaiya resume
array problems
arrays in java
dsa questions
java dsa
leetcode trapping rain water
minimum swaps required to bring all elements less than or equal to k together
rain water preservation code in java
rainwater harvesting
rainwater preservation in java
trapping rain water 2
trapping water leetcode
anuj
array dsa
best time to buy and sell stock ii
best time to buy and sell stock leetcode
buy and sell stocks leetcode
chocolate distribution problem
data structures
dsa array
dsa java
maximum profit by buying and selling a share at most twice
maximum water between two buildings
rainwater preservation java code
stock buy and sell leetcode
stock span problem
trapping rain water java
trapping rain water neetcode
trapping rain water python
trapping rainwater problem using stack
trapping water
two pointer problems
water collection
water connection problem gfg
water jug problem in artificial intelligence
Million times better explanation provided here than those unwanted unnecessary animated videos. Thanks a lot Anuj Bhaiya.
totally agree
We got the reference bro chill 😂
Criticising apna college 😂😂😂
Sahi baat😂😂
totally agreed. at apna college only didi is okay, the bhaiya there teaching is very bad. I finally understood Rainwater trap problem.
Aur laao bhaiya aur laao - maza aa raha hai. Mein sirf aapke solutions and approaches hi dekhta hun kyun ki mujhe samjh acche se aata hai aur aapka explanation hai hi alag level aur ekdum clear. Thank you so so so so much.
Bhaiya animated content nahi h magar full concept clear hi jata h 👍
wo kya hai na har jagah animation ghosed nahi sakte ,kai cheeze simple hi achi lagti hai
@@amanahmed6057 agar concept achese Padhaya jaye na to anim ki koe jarurat nahi
I got this type of question in a interview of a product based company. Was able to do wit confidance ❤❤❤❤ thank. you
Pen +white board + bhaiyya's easy explaination=consept clear☺️
A great way of explaining, thank you, buddy!
OMG! This was such a beautiful and intuitive solution!! I broke my head understanding Leetcode solutions but you explained it so well!!! Kudos!!
The consistency 🔥🔥🔥
easy and simple, i spent lot of time to do it by myself , but today i come to know it was easy . Thank you bhaia
Nice explanation!!! Soo simple and to the point!! Thanks lot!!
I'm being thankful for ur explanation sir..eventhough I'm unable to understand hindi,I understood concept so easily😄🙌
Million times better explanation provided here than those unwanted unnecessary animated videos. Thanks a lot Anuj Bhaiya.
We understand more on black/white board thank you Bhaiya.
Ctrl C + Ctrl V
I have seen lot of channels to understand dsa and algo,,trust me sir ur way of explanation is too good even a beginner can understand thing s with ease thanx>>>3
You're the best teacher I've ever seen
Teaching way is awesome ❤️❤️❤️
Leetcode says this approach is having high complexity, but I haven't seen a better, simpler logic.
its O(n), i dont think there can be a better time complexity.
@@devendr09 the space is O(n) as auxulary array r required..... it can be done in O(1) space complexity using 2 pointer
@@arghyadeepdas3475 O(1) is impossible, using 2 pointers it will be O(n/k), which is equal to O(n).
Simple, crisp and best explanation ❤️❤️
Always attentive during your lecture ❤️
bhai bhai itna simple kaise ho skta, paji tusi great ho😅, gfg ka paid course liya hu baki yt pr v search kiya but isase axa easy koi nhi bta skta❤❤❤❤
thank you for such a simple explination in 10 min . Thank you so much bro
Nice explanation! Simple and Crisp!
You are a genius, took me 2 hours to solve and could only come with o(n2) brute force.
Thank you very much for making it so easy. Loved it
I have seen a lot of solutions to this problem but no one has understood finally anuj bhaiya you have explained thank you Anuj bhaiya
love you Anuj Bhaiya, best series for DSA , Thank you
Thank you bhaiya you gave awesome approach and very simple and easy to understand.
Very very informative and useful ❤️❤️❤️
Very clear and amazing explanation. Thank you Bhaiya. After your explanation I could able to code it myself
Best explanation, keep up the good work :)
Thank U Sir , It was an excellent explanation
I did my first hard problem on Leetcode today, Very nice explanation
Great explaination thank you Anuj Bhaiya.
Nobody can explain better than him .. KUDOS!!
oh my God. Itna easy explanation!! thank you so much. I could write the code before looking at your code
Nice explanation. Simple and on point ♥️
Thanks Anuj. Very good explanation
Best explanation bhaiya👍
Instead of two arrays can we use stacks also that would reduce space complexity?
amazing explanation thanks alot....very easy to understand.
this guy ekdum to to point explanation no natak direct easily
Wow amazing explanation!!!
thanku bhaiya aapne bohot simple tarike se samjha diya aur kisi channel pe to bahut confusing lag raha tha .THANKS A LOT
Best teacher ❤️
thanks for videos keep uploading dsa with java one day millions of views honge espe
Great explanation Anuj bhaiyan, Intuition build through this approach which i will not forget!
Nicely explain bhaiya ❤️
a very good explanation seeing u first time and it was really amazing
very good explanation bhaiya..!!
easy to understand..thank you ..!!😊🙌
Bhaiya ek baar mein code submit ho gya, bs 7:10 tk dekha, thanks a lot
Anuj Bhaiya AAP OP ho, maja aagaya algo samj ne, but bhaiya aaisa analysis mujhe nahi aarha how can I perfect it?
Hi Pranav, all you should do to improve your analysis and problem solving skills is practice more problems on variety of concepts.
@@AnujBhaiya I totally agree on this Bhaiya, but with variety of different problems time becomes an overhead I spend more time on think how can I do it (Even with brute Force analysis), and then I give up I look the solution then sometimes I feel my Time was really wasted.
@@AnujBhaiya thank you so much for replying, keep posting. I sincerely watch your DSA playlist to improve my intuition regarding problem solving.🙏🙏
Bhai sachme kam time me badiya samjha diya...thanks bhai !!
Areee bhai maza aagaya, sab samajh aagaya, kabhi nhi bhulunga ❤
Thanks Anuj bhaiya ❤
Your explanation is so amazing 😍
Best tutorial for this question on whole CZcams.
Concepts gets crystal clear in only 10 minutes 😮
Good explanation. Thank you so much @Anuj
Bhai, based on first hint only I could solved this problem. Really appreciate your content. Thanks 👍
can you please explain how to move ahead...what exactly preprocessed array means
waiting for reply ...anyone cann clarify this pls
Bahut behtarin explanation ...........
thanks a lot, bheji for the great explanation❤❤
Super clear Explanation. Thank you
Excellent explanation!
Thank you sir for this amazing and to-the-point explanation
100k soon 🔥🔥
ahahahahah aj tak ek bar me question nhi bana mujse ye video dekhne ke baad ek bar me seedha ek bar me ban gaya ... thanksss
Best ho yr Anuj bhaiya ap 🙏🏻🙏🏻🙏🏻🙏🏻👍🏻👍🏻👍🏻👍🏻👍🏻❤️❤️❤️❤️
Best explaination thanks Anuj
better explaination than that of apna college tbh in this trapping rainwater problem
bhai thanks a ton yaar boht hi jyada kam aa rhi he ye series specially java me code krne valo k lie. bs ek suggestion he bhai dynamic programming bhi krvalo jaldi se
Great explaination👍
Best explanation. Well done. Keep up the good work!!
Really Good explanation of every problem
Amazing explanation ❤
nice explanation! Thanks!
Thanks for such simplified solution . I was looking at all other places , it just confused me.
nice explaination Anuj bhaiya
This is the problem i get ask at LTI interview
hey bro can you please tell me the questions which were asked to you in your LTI interview
Amazing Sir for your efforts. Pls making such videoes
Great explanation, even a kid can understand
bhoot jada mast samjaya h , i wish ki m jo bhi dsa ki problem solve karu uspar apki vdo mile.
This is one of the deadliest 2 pointer problem I have came across. O(n) time O(1) space.
Nice explanation!!!
very simple and easy explanation
Amazing 👌
thanks for the simple explanation
Muje CZcams per sbse accha brute force explanation lga
done bhaiya thanks a lot for such nice explanations
Keep them coming
what is the meaning of
Bohot acha explanation bhaiya!!
thank you so much for doing efforts
Crystal clear explanation
Amazing explanation
best explanation ever...
Very nice explanation. Thank you♥♥💕
Excellent explanation thank You
Best explanation,
Better than striver
great explanation 🙏
Awesome playlist...
you made it so easy !!!!
explanation bohot badhiya bhaiya
Anuj bhai love u u r amazing
very nice and clear explanation bhaiya
Can we do absolute left minus right and keep one count variable and that will give the same result ?
I understood it in 11 minutes without reversing the video .
Crystal clear explanation.
But code is showing index out of bound exception on leetcode.