Read a string containing only the characters ()[]{}. Print VALID if every bracket is closed by the matching bracket in the correct order, otherwise INVALID.
()[]{}VALID
(]
INVALID
1 ≤ length ≤ 10^5Run your code to see results
Press Ctrl ↵ to run or Ctrl ⇧ ↵ to submit.