Databricks interview question

using array build some things