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

浙公网安备 33010602011771号