Pregunta de entrevista de Accenture

Coding Question and DSA concepts.