The question itself was bad. Make sure you really know how the language you're using works. Plus, the interviewer wasn't much help :(
Make sure to clarify the requirements at the beginning.
Modified version of the question listed under Databricks in LeetCode.
The following metrics were computed from 101 interview experiences for the Databricks Software Engineer role in United States.
Databricks's interview process for their Software Engineer roles in the United States is extremely selective, failing the vast majority of engineers.
Candidates reported having mixed feelings for Databricks's Software Engineer interview process in United States.