This question evaluates proficiency in stack-based parsing, string manipulation, and algorithmic reasoning for correctly matching and nesting multiple bracket types, and belongs to the Coding & Algorithms domain.
Given a string containing only parentheses '()', determine whether it is balanced. Follow-up: extend the solution to also support '[]' and '{}' with correct nesting and ordering. Describe the algorithm, the data structures you would use (e.g., a stack), time and space complexity, and how you would handle edge cases such as empty strings or unexpected characters.