摘要: 题目: 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). You are given a targe 阅读全文
posted @ 2017-05-07 22:15 Vincent丶丶 阅读(149) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a set of candidate numbers (C) (without duplicates) and a target number (T), find all unique combinations in C where the candidate numbers s 阅读全文
posted @ 2017-05-07 21:34 Vincent丶丶 阅读(178) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T. Each 阅读全文
posted @ 2017-05-07 21:33 Vincent丶丶 阅读(180) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a collection of numbers that might contain duplicates, return all possible unique permutations. For example,[1,1,2] have the following uniqu 阅读全文
posted @ 2017-05-07 21:32 Vincent丶丶 阅读(199) 评论(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-07 21:30 Vincent丶丶 阅读(166) 评论(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-07 21:29 Vincent丶丶 阅读(135) 评论(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:28 Vincent丶丶 阅读(166) 评论(0) 推荐(0) 编辑
摘要: 题目: 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-07 21:27 Vincent丶丶 阅读(205) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a string that contains only digits 0-9 and a target value, return all possibilities to add binary operators (not unary) +, -, or * between t 阅读全文
posted @ 2017-05-07 21:26 Vincent丶丶 阅读(183) 评论(0) 推荐(0) 编辑
摘要: 题目: Given n balloons, indexed from 0 to n-1. Each balloon is painted with a number on it represented by array nums. You are asked to burst all the bal 阅读全文
posted @ 2017-05-07 21:25 Vincent丶丶 阅读(368) 评论(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-07 21:24 Vincent丶丶 阅读(178) 评论(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丶丶 阅读(192) 评论(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丶丶 阅读(166) 评论(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丶丶 阅读(196) 评论(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丶丶 阅读(234) 评论(0) 推荐(0) 编辑