Pregunta de entrevista de Microsoft

Tree, 2 pointers, matrix based questions