Valid Parentheses
00:00
AmazonMicrosoft
Given a string with '(', ')', '{', '}', '[', ']', determine if the brackets are valid — every open bracket has a corresponding close bracket in correct order.
Examples
Input → '()[]{}'
Output → True
Input → '([)]'
Output → False
Note: wrong order
Input → '{[]}'
Output → True
Input → ')'
Output → False