NeoSOFT interview question

Asked the Time Complexity of the code which i wrote