Terrascope interview question

balanced paranthesis problem using stacks