摘要: 题目: 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-28 20:36 荒野第一快递员 阅读(735) 评论(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-28 20:05 荒野第一快递员 阅读(387) 评论(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-28 14:33 荒野第一快递员 阅读(477) 评论(3) 推荐(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-28 10:56 荒野第一快递员 阅读(237) 评论(1) 推荐(1) 编辑
摘要: 题目: Given a string of numbers and operators, return all possible results from computing all the different possible ways to group numbers and operators 阅读全文
posted @ 2017-05-27 09:49 荒野第一快递员 阅读(258) 评论(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-26 16:13 荒野第一快递员 阅读(229) 评论(0) 推荐(0) 编辑
摘要: 题目: Find the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element. For 阅读全文
posted @ 2017-05-26 15:05 荒野第一快递员 阅读(218) 评论(0) 推荐(0) 编辑
摘要: 题目: Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times. You may assume that 阅读全文
posted @ 2017-05-26 10:18 荒野第一快递员 阅读(159) 评论(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,- 阅读全文
posted @ 2017-05-26 09:11 荒野第一快递员 阅读(184) 评论(0) 推荐(0) 编辑
摘要: 题目: Given an array of integers sorted in ascending order, find the starting and ending position of a given target value. Your algorithm's runtime comp 阅读全文
posted @ 2017-05-25 10:01 荒野第一快递员 阅读(224) 评论(0) 推荐(0) 编辑