摘要: Given a complete binary tree, count the number of nodes. Definition of a complete binary tree from Wikipedia: In a complete binary tree every level, e 阅读全文
posted @ 2016-08-22 12:40 LiBlog 阅读(149) 评论(0) 推荐(0) 编辑
摘要: Given a list of unique words. Find all pairs of distinct indices (i, j) in the given list, so that the concatenation of the two words, i.e. words[i] + 阅读全文
posted @ 2016-08-22 10:25 LiBlog 阅读(570) 评论(0) 推荐(0) 编辑
摘要: Implement a trie with insert, search, and startsWith methods. Note: You may assume that all inputs are consist of lowercase letters a-z. Solution: 阅读全文
posted @ 2016-08-22 08:49 LiBlog 阅读(139) 评论(0) 推荐(0) 编辑