We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 33b135d commit f1243fdCopy full SHA for f1243fd
src/solution/s0026_remove_duplicates_from_sorted_array.rs
@@ -45,9 +45,9 @@
45
*/
46
pub struct Solution {}
47
48
-// problem: https://leetcode.com/problems/remove-duplicates-from-sorted-array/
49
-// discuss: https://leetcode.com/problems/remove-duplicates-from-sorted-array/discuss/?currentPage=1&orderBy=most_votes&query=
50
-
+// problem: https://leetcode.com/problems/remove-duplicates-from-sorted-array/
+// discuss: https://leetcode.com/problems/remove-duplicates-from-sorted-array/discuss/?currentPage=1&orderBy=most_votes&query=
+
51
// submission codes start here
52
53
impl Solution {
@@ -63,6 +63,7 @@ impl Solution {
63
nums[slow] = nums[fast];
64
}
65
66
+ nums.truncate(slow + 1);
67
(slow + 1) as i32
68
69
0 commit comments