BigStep Interview Question

Write a programm for valid parentheses