Databricks interview question

Medium to hard coding questions + concurrence.