Domanda di colloquio di Dentsu

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