摘要: Given a binary tree Populate each next pointer to point to its next right node. If there is no next right node, the next pointer should be set to NULL 阅读全文
posted @ 2016-06-25 17:48 Miller1991 阅读(111) 评论(0) 推荐(0) 编辑
摘要: Suppose a sorted array is rotated at some pivot unknown to you beforehand. (i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2). Find the minimum element. 阅读全文
posted @ 2016-06-25 17:17 Miller1991 阅读(142) 评论(0) 推荐(0) 编辑
摘要: A 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 p 阅读全文
posted @ 2016-06-25 16:32 Miller1991 阅读(142) 评论(0) 推荐(0) 编辑
摘要: Find the contiguous subarray within an array (containing at least one number) which has the largest sum. For example, given the array [−2,1,−3,4,−1,2, 阅读全文
posted @ 2016-06-25 16:17 Miller1991 阅读(118) 评论(0) 推荐(0) 编辑