当前位置:网站首页>Zero shift of leetcode

Zero shift of leetcode

2022-08-09 06:34:00 In the history of the strongest disciple

The key to this problem is that for nums[j] there is always zero or a normal integer with i == j.

public class Test6 {public static void main(String[] args) {Test6 test6 = new Test6();int[] nums = {0,1,0,3,12};test6.moveZeroes(nums);}public void moveZeroes(int[] nums) {int j = 0;for(int i=0;i

The output is:

原网站

版权声明
本文为[In the history of the strongest disciple]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/221/202208090629204036.html