上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 33 下一页
摘要: 方法一: reverse ArrayList1 private void reverse(ArrayList nums, int start, int end) {2 for (int i = start, j = end; i < j; i++, j--) {3 ... 阅读全文
posted @ 2015-09-25 01:04 Hygeia 阅读(157) 评论(0) 推荐(0) 编辑
摘要: 题目:Given a rotated sorted array, recover it to sorted array in-place.Example[4, 5, 1, 2, 3] -> [1, 2, 3, 4, 5]ChallengeIn-place, O(1) extra space and ... 阅读全文
posted @ 2015-09-25 00:52 Hygeia 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 题目描述:You are a product manager and currently leading a team to develop a new product. Unfortunately, the latest version of your product fails the qual... 阅读全文
posted @ 2015-09-24 12:03 Hygeia 阅读(150) 评论(0) 推荐(0) 编辑
摘要: binary search模板: 1 class Solution { 2 /** 3 * @param nums: The integer array. 4 * @param target: Target to find. 5 * @return: The f... 阅读全文
posted @ 2015-09-24 09:32 Hygeia 阅读(238) 评论(0) 推荐(0) 编辑
摘要: 题目:Given a sorted array of integers, find the starting and ending position of a given target value.Your algorithm's runtime complexity must be in the ... 阅读全文
posted @ 2015-09-24 09:23 Hygeia 阅读(198) 评论(0) 推荐(0) 编辑
摘要: 题目:Given a strings, partitionssuch that every substring of the partition is a palindrome.Return the minimum cuts needed for a palindrome partitioning ... 阅读全文
posted @ 2015-09-24 07:10 Hygeia 阅读(158) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a string s and a dictionary of words dict, determine if s can be segmented into a space-separated sequence of one or more dictionary words. 阅读全文
posted @ 2015-09-24 06:01 Hygeia 阅读(238) 评论(0) 推荐(0) 编辑
摘要: 题目:Given amxngrid filled with non-negative numbers, find a path from top left to bottom right whichminimizesthe sum of all numbers along its path.Note... 阅读全文
posted @ 2015-09-24 05:14 Hygeia 阅读(152) 评论(0) 推荐(0) 编辑
摘要: 题目:Givenn, how many structurally uniqueBST's(binary search trees) that store values 1...n?For example,Givenn= 3, there are a total of 5 unique BST's. ... 阅读全文
posted @ 2015-09-23 12:27 Hygeia 阅读(192) 评论(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 spac... 阅读全文
posted @ 2015-09-23 11:57 Hygeia 阅读(171) 评论(0) 推荐(0) 编辑
上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 33 下一页