Valid Parentheses — Stack

Decide whether a string of opening and closing bracket symbols is properly nested, with each opener matched in the right order.

Stack · Easy

The problem

Given a string of only round, square and curly brackets, say whether every opener is closed by the right kind, in the right order.

What to return

Constraints

Example

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

Solve it

More in Stack

All algorithm problems