Loading...
Given a string s containing just the characters '(', ')', '{', '}', '[', and ']', determine if the input string is valid.
An input string is valid if:
()[]{}True
()[]{} is processed from left to right, with each opening bracket being pushed onto a stack.( matches ), { matches }, and [ matches ].() is closed, [] is closed, and {} is closed.True.