做这道题的时候思路不是很清晰。写的乱七八糟!!挺简单的一道题,向别人写的学习!!package Leetcode;public class MergeSortedArray { public static void merge(int A[], int m, int B[], int n) {...
分类:
其他好文 时间:
2014-10-26 12:58:42
阅读次数:
175
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 value to search. If found in the array retur...
分类:
其他好文 时间:
2014-10-26 11:47:46
阅读次数:
203
Given a sorted array, remove the duplicates in place such that each element appear onlyonceand return the new length.Do not allocate extra space for a...
分类:
其他好文 时间:
2014-10-26 11:34:46
阅读次数:
243
题目:Given two sorted integer arrays A and B, merge B into A as one sorted array.Note:You may assume that A has enough space (size that is greater or eq...
分类:
编程语言 时间:
2014-10-26 00:21:33
阅读次数:
216
题目:Given a sorted array, remove the duplicates in place such that each element appear onlyonceand return the new length.Do not allocate extra space fo...
分类:
其他好文 时间:
2014-10-25 22:57:43
阅读次数:
155
题目:Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in...
分类:
其他好文 时间:
2014-10-25 22:45:13
阅读次数:
269
Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length.
Do not allocate extra space for another array, you must do this in place with...
分类:
其他好文 时间:
2014-10-25 18:51:14
阅读次数:
143
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 order of O(log n).
If the target is not found ...
分类:
其他好文 时间:
2014-10-25 17:24:28
阅读次数:
145
Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order.
You may assume no duplicates in the array....
分类:
其他好文 时间:
2014-10-25 17:23:51
阅读次数:
131
【题目】
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 value to search. If found in the a...
分类:
其他好文 时间:
2014-10-25 17:20:39
阅读次数:
225