Pergunta de entrevista da empresa Amazon

Designing algorithm with the best possible time-complexity?