diff --git a/cpp/container_with_most_water.cpp b/cpp/container_with_most_water.cpp
new file mode 100644
index 0000000000..57dea64c3e
--- /dev/null
+++ b/cpp/container_with_most_water.cpp
@@ -0,0 +1,18 @@
+class Solution {
+public:
+    int maxArea(vector<int>& h) {
+        int n = h.size();
+        int i = 0, j = n - 1;
+        int ans = 0,height;
+        while(i < j)
+        {
+            if(h[i] < h[j]){
+            height = h[i];
+            ans = max(ans, (j - i)*height);i++;}
+            else{
+            height = h[j];
+            ans = max(ans, (j - i)*height);j--;}
+        }
+        return ans;
+    }
+};