Domanda di colloquio di Media.net

How would you reduce a time complexity for a simple problem?