Valid Parentheses

Medium
#stack #strings

Input: `s` (str). Return: `True` if brackets are balanced, else `False`.

Example

Input: '()'
Output: True
Need a hint?
  • Use a stack to track open brackets
Run your code to see output