Pregunta de entrevista de Tata Consultancy Services

some technical coding was asked