MicroStrategy Interview Question

Valid Parenthesis grouping, binary search (hacker-rank)