@playwithedith: Day 10: Container With Most Water, always move the shorter wall. Explained with Edithly: turn any document, link or problem into an interactive visual. Try it at app.edithly.com Maya has 6 fence posts, heights 3, 7, 2, 6, 4, 5, and one tarp. Water between two posts stops at the shorter one, so the rain caught is the shorter height times the gap. The best pair is 7 and 5, 4 apart: 20. Checking every pair is O(n²), 15 pairs here. For LeetCode 11, start at both ends and always move the shorter post in. The water can't rise above it and the gap only shrinks, so moving the taller one never helps. Two pointers, 5 looks, O(n). Full step-by-step solvesheet (made with Edithly): app.edithly.com/links/u/6b032bd3f8be35887ecb3ca1 Send this to someone prepping for interviews. Day 11 tomorrow. #leetcode #twopointers #codinginterview #dsa #python

Edith | LeetCode riddles
Edith | LeetCode riddles
Open In TikTok:
Region: US
Tuesday 01 December 2026 20:01:02 GMT
0
0
0
0

Music

Download

Comments

There are no more comments for this video.
To see more videos from user @playwithedith, please go to the Tikwm homepage.

Other Videos


About