leetcode
E01014165
这个作者很懒,什么都没留下…
展开
-
Minimum Depth of Binary Tree
/** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { val = x; } * } */ import java.lan原创 2016-05-26 18:16:03 · 359 阅读 · 0 评论 -
ArrayDeque
java.util.ArrayDeque 类提供了可调整大小的阵列,并实现了Deque接口。以下是关于阵列双端队列的要点:数组双端队列没有容量限制,使他们增长为必要支持使用。它们不是线程安全的;如果没有外部同步。不支持多线程并发访问。null元素被禁止使用在数组deques。它们要比堆栈Stack和LinkedList快。原创 2016-06-08 11:33:55 · 350 阅读 · 0 评论 -
DFS深度遍历 leetcode 17 Letter Combinations of a Phone Number
Given a digit string, return all possible letter combinations that the number could represent.A mapping of digit to letters (just like on the telephone buttons) is given below.Input:Digit st原创 2016-06-12 15:38:47 · 452 阅读 · 0 评论 -
DFS leetcode 22. Generate Parentheses
GGiven n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, given n = 3, a solution set is:[((())), (()()), (())(), ()(()), ()()()]原创 2016-06-14 16:04:34 · 342 阅读 · 0 评论