Problem List|3970. Valid Parentheses LIFO Parser (Part 14)Easy

3970. Valid Parentheses LIFO Parser (Part 14)

StackStrings
### Problem #3970: Valid Parentheses LIFO Parser (Part 14) Given a string `s` containing just the characters `'('`, `')'`, `'{'`, `'}'`, `'['` and `']'`, determine if the input string is valid. An input string is valid if open brackets are closed by the same type of brackets in the correct order.
Example 1:
Input: s = "()"
Output: true
Explanation: Matching pair of parentheses.
Example 2:
Input: s = "()[]{}"
Output: true
Explanation: All pairs match correctly.
Example 3:
Input: s = "(]"
Output: false
Explanation: Mismatched closing bracket.

Constraints:

  • 1 <= s.length <= 10^4
  • s consists of parentheses only ()[]{}.
Integrity: 100%
Loading...
Input Arguments:
s = "()[]{}"
Expected Output:
true