Question d’entretien chez Amazon

What is the Big O for this algorithm