Holman Interview Question

How would you optimize a Spark code