Databricks Interview Question

An LC medium question was asked