⚠ Switch to EXCALIDRAW VIEW in the MORE OPTIONS menu of this document. ⚠ You can decompress Drawing data with the command palette: ‘Decompress current Excalidraw file’. For more info check in plugin settings under ‘Saving’

Excalidraw Data

Text Elements

Input: s = ”[(])”

Input: s = ”([{}])”

True

’(’, ’)’, ’{’, ’}’, ’[’ and ’]‘.

Possible options

False

  • we can use a hash map to store the matching bracket values
  • we can use a stack to append the opening brackets and pop when we find its closing bracket
  • if all values are popped then we have a valid solution