Pergunta de entrevista da empresa Amazon

What is the Big O for this algorithm