NeoSOFT Interview Question

Asked the Time Complexity of the code which i wrote