11 2018 档案
摘要:Trie Time Complexity Insert/search O(l), l is the length of the word Space Complexity O(prefixes), O(n * l * l) n words with length l Binary Search Tr
阅读全文
摘要:一提到Tree, LinkedList,Backtracking首先想到的就是递归。 Recursion总体就是一个思想,把这个recursive()方法的logic用到之后的子问题中。现问题的解可以依赖或者不依赖于子问题的解。 在recursive()中必须要做回溯边界检查或剪枝。if (node
阅读全文