Design Add and Search Words Data Structure

Solution Code
Verifying access...
Video GuideLeetcode Daily

Time Complexity

O(M) for insertion, up to O(\Sigma^M) for search

Space Complexity

O(M × N) to store the nodes