NVIDIA interview question

solve the open parenthesis problem.