From 8cba191bbd2b1aa2b001ce680ef74282851ab9da Mon Sep 17 00:00:00 2001 From: Gaurav Gupta Date: Fri, 31 Oct 2025 19:03:46 +0530 Subject: [PATCH] Container With Most Water --- Container With Most Water | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Container With Most Water diff --git a/Container With Most Water b/Container With Most Water new file mode 100644 index 0000000..83b4fe6 --- /dev/null +++ b/Container With Most Water @@ -0,0 +1,17 @@ +class Solution { +public: + static inline int area(int l, int r, vector& height){ + return min(height[l], height[r])*(r-l); + } + static int maxArea(vector& height) { + int n=height.size(); + int l=0, r=n-1; + int A=0; + while (l