Question d’entretien chez Dentsu

They asked me to solve a coding problem using arrays and explain the time complexity.