NVIDIA interview question

Write a program to solve the balanced parantheses problem. Search online you will get it.