摘要:
leetcode_打卡10 题目:283. 移动零 思路:双指针,数值互相交换,不是复制覆盖 代码: class Solution { public void moveZeroes(int[] nums) { int n=nums.length; int l=0,r=0; while(r<n){ i 阅读全文
摘要:
leetcode_打卡09 题目:443. 压缩字符串 思路:双指针 代码: class Solution { public int compress(char[] chars) { int n = chars.length; int write = 0, left = 0; for (int re 阅读全文