Freshworks Interview Question

Write a program for paranthesis matching