Databricks interview question

An LC medium question was asked