Pergunta de entrevista da empresa Xtremum Solutions

How to fine time complexity?