摘要:
题目描述 有一个长为n的数组A,求满足0≤a≤b<n的A[b]-A[a]的最大值。 给定数组A及它的大小n,请返回最大差值。 测试样例: [10,5],2 返回:0思路:最大插差值dis初始化为0,用一个指针从头遍历,找到指针之前及指针指向的元素的最小值为被减数min1,若指针指向的元素A[i] - 阅读全文
posted @ 2016-07-22 22:30
琴影
阅读(728)
评论(0)
推荐(0)
摘要:
There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity sh 阅读全文
posted @ 2016-07-22 20:38
琴影
阅读(116)
评论(0)
推荐(0)

浙公网安备 33010602011771号