LeetCode 11: Don't Be Average!

1 year ago
9

LeetCode 11. Container With Most Water

In this video we split the average vanilla solution for LeetCode 11 by introducing two IF conditions, and by doing so we make it the fastest algorithm. We explore the point of mathematical declarations versus procedural calculations and finally we introduce a tiny optimisation on dealing with the height.

Solved in Python 3

Blog post here: https://yeah.computer/posts/003-leetcode-11-dont-be-average/

Loading comments...