摘要: http://oj.leetcode.com/problems/minimum-depth-of-binary-tree/This question is pretty similar to the solution of Maximum Depth of Binary Tree, the only... 阅读全文
posted @ 2015-06-30 05:22 米丹 阅读(119) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest le... 阅读全文
posted @ 2015-06-27 04:16 米丹 阅读(93) 评论(0) 推荐(0) 编辑
摘要: You are climbing a stair case. It takesnsteps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb... 阅读全文
posted @ 2015-06-26 03:11 米丹 阅读(95) 评论(0) 推荐(0) 编辑
摘要: Write a program to solve a Sudoku puzzle by filling the empty cells.Empty cells are indicated by the character'.'.You may assume that there will be on... 阅读全文
posted @ 2015-06-12 21:23 米丹 阅读(186) 评论(0) 推荐(0) 编辑
摘要: Given a sorted array, remove the duplicates in place such that each element appear onlyonceand return the new length.Do not allocate extra space for a... 阅读全文
posted @ 2015-06-01 20:41 米丹 阅读(87) 评论(0) 推荐(0) 编辑
摘要: Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists./** * Def... 阅读全文
posted @ 2015-05-29 23:43 米丹 阅读(137) 评论(0) 推荐(0) 编辑