Reported interview periodNot available
Valid Bracket Sequence
Given a string containing only (, ), [, ], {, and }, determine whether every opener is closed by the matching type in the correct order.
Practice focusThe empty string is valid. A closing bracket with no pending opener is invalid, as is any opener left at the end. Target O(n) time and O(n) worst-case space. Staged follow-ups 1. Ignore brackets inside quoted strings while respecting escape characters. 2. Report the location and expected token for the first mismatch. 3. Validate a stream incrementally across chunk boundaries.