Pergunta de entrevista da empresa Mapbox

Calculate the algorithmic complexity of the algorithm