![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
力扣
普通网友
这个作者很懒,什么都没留下…
展开
-
1. 两数之和 (力扣)
解题思路一; 1.数组nums, 和目标值target 2.遍历数组元素a,是否存在一个值= target-a; class Solution { public int[] twoSum(int[] nums, int target) { for(int i=0;i<nums.length;i++){ for(int j=i+1;j<n...原创 2019-09-16 18:01:23 · 81 阅读 · 0 评论 -
905. 按奇偶排序数组
905. 按奇偶排序数组 package Soution; class Solution905 { public int[] sortArrayByParity(int[] A) { /** * 解法一:头尾交换 * 在没有参数说明之前, 最好进行判断 * 左偶右奇L++ R-- * 左偶右偶 L++ * 左奇右...原创 2019-09-22 22:43:05 · 126 阅读 · 0 评论