Description:
Solution:
- We make a TrieNode() class.
- In TrieNode(), we have two attribute: children, endOfWord
- In insert(), if c is not in cur.children, we put the c in it. And mark the last character as endOfWord.
- In search(), if c is not in cur.children, we return False.
- In startsWith(), it is same with search function. But, we use prefix in this case.