Pergunta de entrevista da empresa Databricks

Modified version of question listed under Databricks in Leetcode