Pregunta de entrevista de Susquehanna International Group

Time complexity of an example function