Pregunta de entrevista de Microsoft

Time and space complexity, average and worst case