导航

2015年8月16日

摘要: Implement a trie withinsert,search, andstartsWithmethods.Note:You may assume that all inputs are consist of lowercase lettersa-z.思路:实现单词查找树,它是一种树形结构;用... 阅读全文

posted @ 2015-08-16 17:05 骄阳照林 阅读(193) 评论(0) 推荐(0) 编辑

摘要: Design a data structure that supports the following two operations:void addWord(word)bool search(word)search(word) can search a literal word or a regu... 阅读全文

posted @ 2015-08-16 15:22 骄阳照林 阅读(130) 评论(0) 推荐(0) 编辑

摘要: Given a binary tree, return all root-to-leaf paths.For example, given the following binary tree: 1 / \2 3 \ 5All root-to-leaf paths are:["1->... 阅读全文

posted @ 2015-08-16 12:16 骄阳照林 阅读(130) 评论(0) 推荐(0) 编辑