Pergunta de entrevista da empresa Leonteq Securities

Question regarding algorithm complexity