Databricks Interview Question

Prefix Tree problem. Check the past for detailed description