Skip to main content

Practice ยท 4 of 4

Balanced brackets

CHALLENGE
Difficulty: beginner+25 XP

Implement static bool IsBalanced(string s) โ€” true when every bracket in s (only ()[]{} appear) closes in the correct nesting order. "([)]" is NOT balanced.

Back to lesson: Practice: Algorithm workshop