Balanced Parentheses

Please Let me know where my code went wrong

hi @samyakjain1050_65748654e19948da,
use a vector to store the ans and print in reverse order, the ans is correct just the order is not matching
–> updated https://ide.codingblocks.com/s/663180