Trapping Rain Water | HARD Leetcode Problem | Most important interview coding question|with solution

  Рет қаралды 6,939

Algo Tamizha

Algo Tamizha

Күн бұрын

Пікірлер: 26
@thavashankarj1168
@thavashankarj1168 Жыл бұрын
nice one here s two pointer approach public class Solution { public int trap(int[] h) { int l = 0, r = h.length - 1, lmax = Integer.MIN_VALUE, rmax = Integer.MIN_VALUE, ans = 0; while (l < r) { lmax = Math.max(lmax, h[l]); rmax = Math.max(rmax, h[r]); if(lmax
@FifthArima
@FifthArima 9 ай бұрын
This one is the simplest way to solve, easy to understand and is good for starters. I'd say decent for an interview. Yet there are different approaches to this problem 1. Using DP 2. Using two pointers 3. Using monotonic stack . The two pointer is the most optimal solution with no extra space. I would always advise folks to know all the possible ways to solve a problem. so that you have the edge when asked for optimization during follow ups !
@gokulnath589
@gokulnath589 Жыл бұрын
Pakka code bro🔥🔥 yepdi bro neenga mattum ipdiala yosikiringa vere Mari bro superb 🤝🤝🤝
@r.prabhakaraarjun6796
@r.prabhakaraarjun6796 4 ай бұрын
Mass bro neee...... Nalla sonninga!
@yadeshwararamm8260
@yadeshwararamm8260 3 жыл бұрын
Superb bro. ... I want more Qestions like this......🔥🔥🔥
@AlgoTamizha
@AlgoTamizha 3 жыл бұрын
sure🙌. keep supporting and sharing. thanks
@susmithamohan8150
@susmithamohan8150 2 ай бұрын
Thanks a lot it seems super easy now
@mohamedfaizal4360
@mohamedfaizal4360 5 ай бұрын
super bro. crystal clear explanation.
@selvaragavan_10
@selvaragavan_10 Жыл бұрын
Annae mass nae nee🙌🏻❤️
@mohammedimthiyas5277
@mohammedimthiyas5277 4 ай бұрын
Super bro
@TheVinothg
@TheVinothg 3 жыл бұрын
Great Explanation!!
@srinivas3777
@srinivas3777 9 ай бұрын
super explanation bro
@RadhamaniRamadoss
@RadhamaniRamadoss 2 жыл бұрын
Excellent bro.. I am able to easily understand the problem after watching your video and was able to code in Python
@AlgoTamizha
@AlgoTamizha 2 жыл бұрын
thats awesome. keep up the great work 👍
@aldricanto7724
@aldricanto7724 4 ай бұрын
tamil nadu oda striver bro neenga
@abhineveash
@abhineveash 5 ай бұрын
❤❤❤
@gokul4476
@gokul4476 3 жыл бұрын
Niceee❤️
@RaichuTheLegend
@RaichuTheLegend Жыл бұрын
bro zoho la entha question kettaga bro. level 2 on 27th December 2023
@gokulnath589
@gokulnath589 Жыл бұрын
Pls upload array medium level important questions for freshers
@AlgoTamizha
@AlgoTamizha Жыл бұрын
on the way..
@gokulnath589
@gokulnath589 Жыл бұрын
@@AlgoTamizha Thank you ♥️
@abishek553
@abishek553 3 жыл бұрын
Bro enakku itha eclipse la pottu kaatunga.. Enakku ithula konjam puriyala bro
@AlgoTamizha
@AlgoTamizha 3 жыл бұрын
next video la epdi indha code ah full java program ah maathalamnu solren bro
@abishek553
@abishek553 3 жыл бұрын
@@AlgoTamizha nandri bro
@abishek553
@abishek553 3 жыл бұрын
Anna zoho set 1 la 2 nd question podunga anna
@codewithdeku
@codewithdeku 10 ай бұрын
It works #beatbox #tiktok
00:34
BeatboxJCOP
Рет қаралды 41 МЛН
The evil clown plays a prank on the angel
00:39
超人夫妇
Рет қаралды 53 МЛН
Сестра обхитрила!
00:17
Victoria Portfolio
Рет қаралды 958 М.
AI Is Making You An Illiterate Programmer
27:22
ThePrimeTime
Рет қаралды 250 М.
Divide Players Into Teams of Equal Skill - Tamil - Leetcode 2491
14:02
MOST IMPORTANT DP problem - Coin Change - Leetcode 322
17:50
Algo Tamizha
Рет қаралды 2 М.
Budget and New Tax Law will apply for 2025 & 2026 Exams ????
10:38
CA Bhanwar Borana
Рет қаралды 59 М.
It works #beatbox #tiktok
00:34
BeatboxJCOP
Рет қаралды 41 МЛН