摘要: JAVA: class WordDictionary { private Node head; /** * Initialize your data structure here. */ public WordDictionary() { this.head = new Node(null); } 阅读全文
posted @ 2021-01-03 18:30 牛有肉 阅读(97) 评论(0) 推荐(0)
摘要: JAVA 实现: class Trie { private Node head; /** * Initialize your data structure here. */ public Trie() { this.head = new Node(); } /** * Inserts a word 阅读全文
posted @ 2021-01-03 16:08 牛有肉 阅读(102) 评论(0) 推荐(0)
摘要: JAVA: public List<List<String>> suggestedProducts(String[] products, String searchWord) { Node head = initTree(products); List<List<String>> reList = 阅读全文
posted @ 2021-01-03 00:07 牛有肉 阅读(143) 评论(0) 推荐(0)