Terrascope Interview Question

balanced paranthesis problem using stacks