Just cleared a major hurdle: Trapping Rain Water solved! ✅Preprocessing with MaxLeft and MaxRight arrays made the $O(n)$ logic click. It feels good to turn a "Hard" problem into a solved one. 🚀Next goal: Optimize to $O(1)$ space. 🛠️#100DaysOfCode#DSA#LeetCode#Coding#SDE
We will be joining @EmmaVigeland and @SamSeder on @majorityfm live tomorrow to discuss the 800,000 sq ft industrial warehouse being converted into an ICE Detention Center in Hagerstown, Maryland and how Hagerstown Rapid Response is working with the community to stop it. #MaxLeft
DSA | Trapping Rain Water
At any index i:
water = min(maxLeft, maxRight) − height[i]
Build prefix max and suffix max arrays
Add only positive values
Time complexity: O(n)
Simple idea. Classic problem. @CoderArmy
Day 4 of the #gfg160 Daily DSA Challenge w/ @geeksforgeeks#GeekStreak2025
🦘 Q: Last Moment Before All Ants Fall Out
⚡ Tracked farthest ant moving left & right
🔄 Answer = max of (maxLeft, maxRight)
✅ Simple greedy observation
A neck beard is not any beard that goes beneath the chin. I'm sure you're beautiful under that pfp-less Marxist twitter account buddy. Beautiful and MAXLEFT.
Just solved LeetCode 42: Trapping Rain Water⛈️
Got 1ms runtime, beating 63.18% of submissions! Used precomputed maxLeft & maxRight arrays for efficient computation.
How do you approach this classic problem? Let’s discuss! 🔥 #LeetCode#Coding
Today's DSA Exploration: Trapping Rain Water.
Here are my thought processes in arriving at the solution:
- Water trapped = min(maxLeft, maxRight) - currentHeight.
- made use of 2 pointer to iterate.
- Tracked max height from start & end.
#DSA#buildinpublic
Median of 2 sorted Array.
Here are my steps for solving it,
- Ensure the smaller array is nums1.
- Use binary search to partition nums1 & nums2.
- Get partition for both arrays.
- Check partition validity using maxLeft & minRight.
- Calculate the median (even or odd cases).
#DSA
Another famous 2-pointer problem: "Trapping Rainwater"! Start with pointers at both ends, track max left and right heights. At every trappable position, calculate trapped water using min(maxLeft, maxRight) - height[I]💧✨
#coding#leetcode#grind#dsa#problemsolving
Breaking news: multiple sources confirm that MaxLeft has been spotted with his event organisers and many fans believe it could be a rescheduling of the BTOY festival!
It is finally time... BTOY! The greatest award show of all time! Vote for the best tweet of the year! (I would suggest voting for Maxleft because I think he’s funny but I’m not trying to influence your decision at all)