Link to the code: https://pastebin.com/zRzykhdV
Link to the question: https://leetcode.com/problems/impleme...
*Complexity Analysis*
For all 3 methods i.e. insert, search, and startsWith
Time complexity: O(m), where m is the word length.
SUPPORT MY WORK BY SUBSCRIBING TO THE CHANNEL :
/ @akshaygoyal2134
LeetCode Playlist: • Prison Cells After N Days | prison cells a...