Example 1
()[]{}
Valid
Explanation Each pair opens and closes properly.
()[]{}
Valid
Explanation Each pair opens and closes properly.
([{}])
Valid
Explanation Nested correctly, inside-out.
(]
Invalid
Explanation ( is closed by ], which is the wrong type.
((
Invalid
Explanation Two brackets are never closed.