Domanda di colloquio di J.P. Morgan

time complexity,space complexity, python lost functions