Databricks Interview Question

Get an array in place from binary tree