Pregunta de entrevista de Microsoft

DSA based question including competetive programming.