Skip to content

Commit

Permalink
fix 26
Browse files Browse the repository at this point in the history
  • Loading branch information
alisenola committed Oct 8, 2020
1 parent a53255f commit 8921287
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/solution/s0026_remove_duplicates_from_sorted_array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@
*/
pub struct Solution {}

// 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=

// 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=

// submission codes start here

impl Solution {
Expand All @@ -63,6 +63,7 @@ impl Solution {
nums[slow] = nums[fast];
}
}
nums.truncate(slow + 1);
(slow + 1) as i32
}
}
Expand Down

0 comments on commit 8921287

Please sign in to comment.