求数组中两个元素最大差值
摘要:
一个整数数组a[n],在a[n]中找两个数字,使得下标大的数字减去下表小的数字所得的差值最大,即:在a[n]中找 a[i] 和 a[j] ,使得 a[i] - a[j] 的值最大,并且 i > j 。 寻求O(n)的解法 如果要求i<j的话: 阅读全文
posted @ 2018-02-01 16:30 wsw_seu 阅读(500) 评论(0) 推荐(0) 编辑
posted @ 2018-02-01 16:30 wsw_seu 阅读(500) 评论(0) 推荐(0) 编辑
posted @ 2018-02-01 16:27 wsw_seu 阅读(171) 评论(0) 推荐(0) 编辑
posted @ 2018-02-01 16:24 wsw_seu 阅读(135) 评论(0) 推荐(0) 编辑
posted @ 2018-02-01 16:23 wsw_seu 阅读(172) 评论(0) 推荐(0) 编辑
posted @ 2018-02-01 16:13 wsw_seu 阅读(300) 评论(0) 推荐(0) 编辑
posted @ 2018-02-01 15:58 wsw_seu 阅读(982) 评论(0) 推荐(0) 编辑
posted @ 2018-02-01 14:38 wsw_seu 阅读(100) 评论(0) 推荐(0) 编辑