Frage im Vorstellungsgespräch bei Natron Energy

Describe the time complexity of the code written in Python.