Shift Technology interview question

Time Complexity of a function