摘要: 题目: 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,- 阅读全文
posted @ 2017-05-07 21:24 Vincent丶丶 阅读(177) 评论(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 a 阅读全文
posted @ 2017-05-07 21:23 Vincent丶丶 阅读(185) 评论(0) 推荐(0) 编辑
摘要: 题目: Follow up for "Unique Paths": Now consider if some obstacles are added to the grids. How many unique paths would there be? An obstacle and empty s 阅读全文
posted @ 2017-05-07 21:21 Vincent丶丶 阅读(177) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its pa 阅读全文
posted @ 2017-05-07 21:20 Vincent丶丶 阅读(154) 评论(0) 推荐(0) 编辑
摘要: 题目: You are climbing a stair case. It takes n steps to reach to the top. Each time you can either climb 1 or 2 steps. In how many distinct ways can yo 阅读全文
posted @ 2017-05-07 21:19 Vincent丶丶 阅读(191) 评论(0) 推荐(0) 编辑
摘要: 题目: Write an efficient algorithm that searches for a value in an m x n matrix, return the occurrence of it. This matrix has the following properties: 阅读全文
posted @ 2017-05-07 21:18 Vincent丶丶 阅读(165) 评论(0) 推荐(0) 编辑
摘要: 题目: Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: Integers in each row are sort 阅读全文
posted @ 2017-05-07 21:18 Vincent丶丶 阅读(195) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a digit string, return all possible letter combinations that the number could represent. A mapping of digit to letters (just like on the tel 阅读全文
posted @ 2017-05-07 21:15 Vincent丶丶 阅读(195) 评论(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 elem 阅读全文
posted @ 2017-05-07 21:08 Vincent丶丶 阅读(203) 评论(0) 推荐(0) 编辑
摘要: 题目: There is an integer array which has the following features: The numbers in adjacent positions are different. A[0] < A[1] && A[A.length - 2] > A[A. 阅读全文
posted @ 2017-05-07 21:06 Vincent丶丶 阅读(233) 评论(0) 推荐(0) 编辑