Databricks interview question

Leetcode Style hard but fair questions