Domanda di colloquio di Oracle

Optimize time and memory complexity for some algorithm