Mapbox Interview Question

Calculate the algorithmic complexity of the algorithm