![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Leetcode刷题
某猿蚊常叮
这个作者很懒,什么都没留下…
展开
-
数组平方排序
这个问题我卡了很久,我一直想的是从中间拆分数组,但是遇到那种不对称的数组,就无法执行, 下面是别人的代码 class Solution { public int[] sortedSquares(int[] nums) { int left = 0 ; int right = nums.length-1; int[] result = new int[nums.length]; int idx = nums.length - 1;原创 2020-12-24 01:18:57 · 281 阅读 · 0 评论 -
判断数组中有多少个数满足“偶数字“
样例: Input: nums = [12,345,2,6,7896] Output: 2 Explanation: 12 contains 2 digits (even number of digits). 345 contains 3 digits (odd number of digits). 2 contains 1 digit (odd number of digits). 6 contains 1 digit (odd number of digits). 7896 contains 4 di原创 2020-12-23 23:42:34 · 197 阅读 · 0 评论