Pregunta de entrevista de Xtremum Solutions

How to fine time complexity?