Pregunta de entrevista de Microsoft

Data Structues and Algorithms One string question and a followup question