Nested Bracket Scoring - Coding problem | OneNoughtOne