From 7b93a8fe37f8804d97283030e13758a980877e66 Mon Sep 17 00:00:00 2001 From: Jai Agarwal Date: Fri, 25 Oct 2019 21:50:03 +0530 Subject: [PATCH] added solution and modified README.md for problem 11 --- leetcode/README.md | 1 + leetcode/src/11.c | 30 ++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 leetcode/src/11.c diff --git a/leetcode/README.md b/leetcode/README.md index fe701f66..19c79d49 100644 --- a/leetcode/README.md +++ b/leetcode/README.md @@ -10,6 +10,7 @@ LeetCode |2|[Add Two Numbers](https://leetcode.com/problems/add-two-numbers/) | [C](./src/2.c)|Medium| |3|[Longest Substring Without Repeating Characters](https://leetcode.com/problems/longest-substring-without-repeating-characters/) | [C](./src/3.c)|Medium| |4|[Median of Two Sorted Arrays](https://leetcode.com/problems/median-of-two-sorted-arrays/) | [C](./src/4.c)|Hard| +|11| [Container With Most Water](https://leetcode.com/problems/container-with-most-water/) | [C](./src/11.c)|Medium| |20|[Valid Parentheses](https://leetcode.com/problems/valid-parentheses/) | [C](./src/20.c)|Easy| |21|[Merge Two Sorted Lists](https://leetcode.com/problems/merge-two-sorted-lists/) | [C](./src/21.c)|Easy| |24|[Swap Nodes in Pairs](https://leetcode.com/problems/swap-nodes-in-pairs/) | [C](./src/24.c)|Medium| diff --git a/leetcode/src/11.c b/leetcode/src/11.c new file mode 100644 index 00000000..1530a86b --- /dev/null +++ b/leetcode/src/11.c @@ -0,0 +1,30 @@ +//Fucntion to calculate min of values a and b +int min(int a, int b){ + return ((ares) + res = currArea; + + if(height[start]