Databricks interview question

Background, Coding Assignment based on Spark