Databricks Interview Question

Simple coding question, no fancy algorithms.