学会思考
刻意练习
摘要: 参考: https://blog.csdn.net/musechipin/article/details/85273856 题目描述:https://leetcode.com/problems/remove-duplicates-from-sorted-array/ class Solution{ 阅读全文
posted @ 2020-03-11 15:02 Worty 阅读(298) 评论(0) 推荐(0) 编辑
摘要: /** * @brief 给定一个数组nums,将所有的0移动到数组的末尾,同时保留非0元素的相对顺序; * @param nums */ void moveZeros(vector<int>& nums){ int i = 0,poz = 0; for(int i = 0; i < nums.si 阅读全文
posted @ 2020-03-11 14:12 Worty 阅读(1240) 评论(1) 推荐(0) 编辑