Chase interview question

Design check depositing system - Balancing parentheses