上一页 1 ··· 9 10 11 12 13 14 15 下一页
摘要: 131. Palindrome Partitioning Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrome 阅读全文
posted @ 2016-03-06 07:00 新一代的天皇巨星 阅读(230) 评论(0) 推荐(0)
摘要: 133. Clone Graph Clone an undirected graph. Each node in the graph contains a label and a list of its neighbors. OJ's undirected graph serialization: 阅读全文
posted @ 2016-03-05 13:39 新一代的天皇巨星 阅读(214) 评论(0) 推荐(0)
摘要: 102. Binary Tree Level Order Traversal Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by l 阅读全文
posted @ 2016-03-01 01:22 新一代的天皇巨星 阅读(186) 评论(0) 推荐(0)
摘要: public List<Integer> inorderTraversal(TreeNode root) { Deque<TreeNode> nodes = new ArrayDeque<TreeNode>(); List<Integer> visits = new LinkedList<Integ 阅读全文
posted @ 2015-09-25 12:08 新一代的天皇巨星 阅读(166) 评论(0) 推荐(0)
摘要:   阅读全文
posted @ 2015-09-21 03:20 新一代的天皇巨星 阅读(123) 评论(0) 推荐(0)
摘要:   阅读全文
posted @ 2015-09-21 02:45 新一代的天皇巨星 阅读(150) 评论(0) 推荐(0)
摘要: /** * Definition for singly-linked list. * public class ListNode { * int val; * ListNode next; * ListNode(int x) { val = x; } * } */public... 阅读全文
posted @ 2015-08-24 22:51 新一代的天皇巨星 阅读(128) 评论(0) 推荐(0)
摘要: Inefficient Print All/One using recursive(DFS)public static void main(String[] args) { solveSudoku(new char[N][N]); ... 阅读全文
posted @ 2015-01-17 10:08 新一代的天皇巨星 阅读(254) 评论(0) 推荐(0)
摘要: DP = Recursion + Memoization, A Smart Brute-force Algorithm Divide the original problem into similar subproblems. Hard desgin part: what are the subpr 阅读全文
posted @ 2015-01-11 12:58 新一代的天皇巨星 阅读(163) 评论(0) 推荐(0)
摘要: Preamble: Fibonacci Series: If n = 0: return 0;If n<=2: return 1;return f(n-1)+f(n-2) Time Complexity: It's the Fibonacci Recurrence function. T(n) = 阅读全文
posted @ 2015-01-11 12:49 新一代的天皇巨星 阅读(148) 评论(0) 推荐(0)
上一页 1 ··· 9 10 11 12 13 14 15 下一页