Leetcode 'Medium Level' interview question #11. Container With Most Water, explained in Javascript. This is one of the famous questions for interviews in many product-based companies. This video covers the problem explanation, logic and code walk-through in Javascript. It also includes code executed on leetcode for both Brute-force and Optimal approaches.
Timestamps
0:00 - Problem statement
2:07 - Brute-force Approach - O(n^2)
4:07 - Code walkthrough - O(n^2)
5:15 - Leetcode Run - O(n^2)
5:43 - Optimal Approach - O(n)
10:25 - Code walkthrough - O(n)
12:12 - Leetcode Run - O(n)
Code
https://github.com/sandeep194920/Leet...