Question d’entretien chez Google

Time and space complexity of implementation