Evaluate the Bracket Pairs of a String

Evaluate the Bracket Pairs of a String - Coding Problem | K5kC