2022年5月4日

2022-5-4 双指针

摘要: 283. 移动零 给定一个数组 nums,编写一个函数将所有 0 移动到数组的末尾,同时保持非零元素的相对顺序。 请注意 ,必须在不复制数组的情况下原地对数组进行操作。 1 class Solution { 2 public void moveZeroes(int[] nums) { 3 int p 阅读全文

posted @ 2022-05-04 10:34 阿ming 阅读(24) 评论(0) 推荐(0)

导航