Amazon Interview Question

LeetCode problem based on prefix tree for fast search words