Intuitive Interview Question

It was the valid parenthesis problem on a stack