On interview question

Stack Queue Match closing and opening brackets using stack