Bloomberg Interview Question

One leetcode medium, tree traversal for spelling words