Xtremum Solutions interview question

How to fine time complexity?