Mapbox interview question

Calculate the algorithmic complexity of the algorithm