208
-
[LeetCode] 208. Implement Trie (Prefix Tree)LeetCode 2021. 10. 8. 10:59
https://leetcode.com/problems/implement-trie-prefix-tree/ Implement Trie (Prefix Tree) - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com Implement Trie Trie 를 만드는 문제다. 정석적인 트리를 이용한 trie가 아닌 문제조건이 좀더 간단하고 자유로워 map을 이용해 풀었다. 들어오는 word의 모든 prefix를 map에 (prefix, 1)로 저장하고 word는 (word, 2..