Problem: Valid Parentheses
Determine if a string containing parentheses, brackets, and braces is valid.
A string is valid if:
- Every opening bracket has a corresponding closing bracket
- Brackets are closed in the correct order
Constraints
- 1 <= s.length <= 10^4
- s contains only '(', ')', '{', '}', '[', ']'
Example
Input: s = "({[]})"
Output: true
Input: s = "({[}])"
Output: false
Complexity
Contribution Guidelines
- Implement in one language (we'll add others later)
- Include README with problem statement and test cases
- Add test harness in your implementation
- Follow code style guide in .gemini/styleguide.md
Problem: Valid Parentheses
Determine if a string containing parentheses, brackets, and braces is valid.
A string is valid if:
Constraints
Example
Input: s = "({[]})"
Output: true
Input: s = "({[}])"
Output: false
Complexity
Contribution Guidelines