Holman interview question

How would you optimize a Spark code