Domanda di colloquio di Interactive Brokers

Just started with average array questions and then asked for their optimization.