Amazon Interview Question

Balanced brackets.