ruijiege

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

2021年7月23日

摘要: public static int[] twoSum(int[] nums, int target) { Map<Integer,Integer> map = new HashMap(); int[] a = new int[2]; for (int i = 0; i < nums.length; 阅读全文
posted @ 2021-07-23 16:59 哦哟这个怎么搞 阅读(30) 评论(0) 推荐(0) 编辑

摘要: public static int[] sortedSquares(int[] nums) { //定义一个双指针 int left=0,right=nums.length-1; int[] res = new int[right+1]; //因为新数组需要排序 for (int i = nums. 阅读全文
posted @ 2021-07-23 16:39 哦哟这个怎么搞 阅读(23) 评论(0) 推荐(0) 编辑