motivation
Top “Hard” Interview Problems from Google, Facebook, FANG (for software engineers) - YouTube
看了这个视频, 视频中解决了三个问题, 刚好这三个问题都比较经典, 所以记录一下.
1 trie的应用:
问题:
- “You are given a prefix and a list of words, you need to return all the potential words that would match this prefix”
- eg: prefix
"do"
, word-list:["dog", "dark", "cat", "door", "dodge"]
, the potential words would be["dog", "door", "dodge"]
;