摘要:
题目:https://leetcode-cn.com/problems/move-zeroes/ 我的想法:使用一个慢指针和一个快指针,慢指针则是用来寻找数组中“0”的位置,快指针用来遍历整个数组以找到不为“0”的元素,然后交互 代码: C++版本: void moveZeroes(vector<i 阅读全文
posted @ 2021-10-11 10:25
wltree
阅读(44)
评论(0)
推荐(0)
摘要:
题目:https://leetcode-cn.com/problems/squares-of-a-sorted-array/ 答案参考:https://programmercarl.com/0977.%E6%9C%89%E5%BA%8F%E6%95%B0%E7%BB%84%E7%9A%84%E5%B 阅读全文
posted @ 2021-10-11 09:10
wltree
阅读(151)
评论(0)
推荐(0)

浙公网安备 33010602011771号