Question d’entretien chez Microsoft

Two sum question and its time complexity.