Ruby's Louvre

每天学习一点点算法

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

统计

2019年12月28日 #

leetcode 720. Longest Word in Dictionary

摘要: 使用前缀树 javascript function Node() { this.word = '' this.children = {} } class Trie { constructor() { this.root = new Node() } addWord(word) { var node 阅读全文

posted @ 2019-12-28 22:35 司徒正美 阅读(466) 评论(0) 推荐(0) 编辑

leetcode 692. Top K Frequent Words

摘要: ```javascript function Node() { this.endCount = 0 this.word = '' this.children = {} } class Tire { constructor() { this.root = new Node() } addWord... 阅读全文

posted @ 2019-12-28 22:01 司徒正美 阅读(520) 评论(0) 推荐(0) 编辑

leetcode 677. Map Sum Pairs

摘要: 使用前缀树 或者 使用map优化一下 阅读全文

posted @ 2019-12-28 20:12 司徒正美 阅读(394) 评论(0) 推荐(0) 编辑

leetcode 676. Implement Magic Dictionary

摘要: 使用Tire 处理 javascript function Node(value) { this.word = null this.children = {} } class MagicDictionary { constructor() { this.root = new Node(null) } 阅读全文

posted @ 2019-12-28 00:17 司徒正美 阅读(379) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示