diff --git a/c++/Container_with_most_water.cpp b/c++/Container_with_most_water.cpp new file mode 100644 index 0000000..a2316d5 --- /dev/null +++ b/c++/Container_with_most_water.cpp @@ -0,0 +1,20 @@ +//https://leetcode.com/problems/container-with-most-water/ + +class Solution { +public: + int maxArea(vector& height) + { + int area=0; + int l=0; + int r=height.size()-1; + while (l