LEETCODE
UNLOCKED
Problems
Donate
Tools
Design Add and Search Words Data Structure
Solution Code
Python
Java
C++
Javascript
Copy
Verifying access...
Video Guide
Leetcode Daily
Time Complexity
O(
M
)
for insertion, up to
O(
\Sigma^M
)
for search
Space Complexity
O(
M × N
)
to store the nodes
Buy the VIVO Glass Deskpad
Available on Amazon
Affiliate