码迷,mamicode.com
首页 >  
搜索关键字:rotated    ( 804个结果
LeetCode-Search in Rotated Sorted Array
...
分类:其他好文   时间:2016-10-05 07:17:20    阅读次数:95
189. Rotate Array----Array----Easy----20160925
问题: Rotate an array of n elements to the right by k steps. For example, with n = 7 and k = 3, the array [1,2,3,4,5,6,7] is rotated to [5,6,7,1,2,3,4]. ...
分类:其他好文   时间:2016-09-26 00:38:55    阅读次数:145
081. Search in Rotated Sorted Array II
...
分类:其他好文   时间:2016-09-23 15:05:51    阅读次数:117
033. Search in Rotated Sorted Array
...
分类:其他好文   时间:2016-09-23 14:46:56    阅读次数:118
Rotate Array
Rotate an array of n elements to the right by k steps. For example, with n = 7 and k = 3, the array [1,2,3,4,5,6,7] is rotated to [5,6,7,1,2,3,4]. Not ...
分类:其他好文   时间:2016-09-22 12:49:09    阅读次数:116
33. Search in Rotated Sorted Array (Array;Divide-and-Conquer)
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 target va ...
分类:其他好文   时间:2016-09-16 22:35:16    阅读次数:162
binary search完整笔记
1 Search in Rotated Sorted Array 二分搜索,注意分清各种情况 1 public class Solution { 2 public int search(int[] nums, int target) { 3 int i = 0, j = nums.length - ...
分类:其他好文   时间:2016-09-16 07:53:35    阅读次数:191
189. Rotate Array
1. 问题描述 189. Rotate ArrayRotate an array of n elements to the right by k steps.For example, with n = 7 and k = 3, the array [1,2,3,4,5,6,7] is rotated ...
分类:其他好文   时间:2016-09-11 01:24:10    阅读次数:142
leetcode-Find Minimum in Rotated Sorted Array II-154
和上题一样,本题的序列中可能有重复的元素,不过用上题的代码能过 ...
分类:其他好文   时间:2016-08-31 20:27:07    阅读次数:136
leetcode-Find Minimum in Rotated Sorted Array-153
一个递增数组,没有重复的元素,可能被右移过,找出最小的元素 这和这题差不多http://www.cnblogs.com/0summer/p/5825282.html 依旧是改进过的二分: 1.如果nums[l]<nums[mid],说明[l,mid]是递增的,但是[mid,r]不确定 1)如果num ...
分类:其他好文   时间:2016-08-31 20:15:29    阅读次数:108
804条   上一页 1 ... 20 21 22 23 24 ... 81 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!