Back to DSA
Valid Parentheses
easyYou receive a string made up exclusively of the bracket characters '(', ')', '{', '}', '[', and ']'. Determine whether the brackets form a correctly nested sequence. A sequence is correct when every opening bracket is paired with a matching closing bracket of the same kind, and brackets close in the proper inside-out order.
Examples
Example 1:
Input:
s = "{[()]}"Output:
true Example 2:
Input:
s = "{(])"Output:
falseHints
1234567