Solve the classic Two Sum problem, then extend the solution using a Trie data structure. The Trie implementation must not assume a fixed 26-letter alphabet — the alphabet is unbounded (e.g., use a hash map for children rather than a fixed-size array). You must…