Frage im Vorstellungsgespräch bei Tata Consultancy Services

Valid parenthesis question in coding round