Databricks interview question

Prefix Tree problem. Check the past for detailed description