KLA interview question

dry run the code and say the time complexity