Databricks Interview Question

traditional algorithm leetcode medium and hard