European Dynamics interview question

Optimizations in computations and memory usage