diff --git a/20-valid-parentheses/README.md b/20-valid-parentheses/README.md new file mode 100644 index 0000000..2fa17b8 --- /dev/null +++ b/20-valid-parentheses/README.md @@ -0,0 +1,36 @@ +

20. Valid Parentheses

Easy


Given a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.

+ +

An input string is valid if:

+ +
    +
  1. Open brackets must be closed by the same type of brackets.
  2. +
  3. Open brackets must be closed in the correct order.
  4. +
+ +

 

+

Example 1:

+ +
Input: s = "()"
+Output: true
+
+ +

Example 2:

+ +
Input: s = "()[]{}"
+Output: true
+
+ +

Example 3:

+ +
Input: s = "(]"
+Output: false
+
+ +

 

+

Constraints:

+ + +
\ No newline at end of file