爱奔跑的读书者

关注

leetcode-26-Remove Duplicates from Sorted Array

爱奔跑的读书者

关注

阅读 44

2023-08-23


Use something like two pointer, a pointer to indicate current position, another to indicate next append position of the new array. Since do not need to actually decrease the length of vector, we just need to told the length of the vector then it will get the length of the vector.


相关推荐

自由的美人鱼

【leetcode】26 Remove Duplicates from Sorted Array

自由的美人鱼 53 0 0

J简文

LeetCode-26. Remove Duplicates from Sorted Array

J简文 36 0 0

犹大之窗

leetcode26-Remove Duplicates from Sorted Array

犹大之窗 13 0 0

兵部尚输

Leetcode: Remove Duplicates from Sorted Array

兵部尚输 112 0 0

舍予兄

【Leetcode】Remove Duplicates from Sorted Array

舍予兄 46 0 0

西特张

26. Remove Duplicates from Sorted Array

西特张 100 0 0

他说Python

Leetcode 26. Remove Duplicates from Sorted Array (Python)

他说Python 60 0 0

自信的姐姐

[LeetCode]Remove Duplicates from Sorted Array II

自信的姐姐 78 0 0

崭新的韭菜

[leetcode] 80. Remove Duplicates from Sorted Array II

崭新的韭菜 104 0 0

扒皮狼

LeetCode-80. Remove Duplicates from Sorted Array II

扒皮狼 52 0 0

精彩评论(0)

0 0 举报