摘要:
本来以为是一道水题,结果居然能从n^2, n*log(n)一直优化到n。感慨啊~O(n^2): 暴力public class Solution { public int[] twoSum(int[] numbers, int target) { // Start typing your Java solution below // DO NOT write main() function int[] r = new int[2]; for (int i = 0; i l) { if (sum > targe... 阅读全文
posted @ 2013-07-09 00:12
阿牧遥
阅读(488)
评论(0)
推荐(0)

浙公网安备 33010602011771号