- 博客(10)
- 收藏
- 关注
原创 leetcode142
1、Linked List Cycle II Given a linked list, return the node where the cycle begins. If there is no cycle, return null.Note: Do not modify the linked list.Follow up: Can you solve it without using ext
2017-03-09 09:34:19 537
原创 leetcode515
1、Find Largest Value in Each Tree Row You need to find the largest value in each row of a binary tree.Example:
2017-03-08 11:05:52 460
原创 leetcode111
Minimum Depth of Binary Tree Given a binary tree, find its minimum depth. The minimum depth is the number of nodes along the shortest path from the root node down to the nearest leaf node.
2017-03-08 10:25:01 457
原创 leetcode104
1、 Maximum Depth of Binary Tree 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 leaf node.
2017-03-08 10:09:44 418
原创 leetcode513
Find Bottom Left Tree Value Given a binary tree, find the leftmost value in the last row of the tree.Example 1:
2017-03-08 09:50:01 518
原创 二叉树的深度优先和广度优先遍历
深度优先等效于先序遍历,根左右的顺序,常常采用递归或者堆栈(后进先出)实现,所以我们先把右子树放入栈中,后放左子树,这样所有的左子树访问完了
2017-03-06 14:43:35 534
原创 leetcode62
Unique PathsA robot is located at the top-left corner of a m x n grid (marked ‘Start’ in the diagram below).The robot can only move either down or right at any point in time. The robot is trying to rea
2017-03-03 10:14:57 423
原创 leetcode485
1、Max Consecutive Ones Given a binary array, find the maximum number of consecutive 1s in this array.Example 1: Input: [1,1,0,1,1,1] Output: 3 Explanation: The first two digits or the last three di
2017-03-03 10:03:22 342
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人