Save 25%Black Friday: 25% off all plans — use code BLACKFRIDAY2026 at checkout. Ends Monday, Dec 7.Claim the deal

Given a string containing three types of brackets: curly brackets {}, square brackets [], and parentheses (). The nesting rules are as follows:

Test Cases
Input
Output
Expected