summaryrefslogtreecommitdiff
path: root/remove-duplicates-from-sorted-array/src/main.rs
blob: 2838a4655d7c8537fe151bb2ebc0172682cb92a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
fn main() {
    println!("Hello, world!");
}

struct Solution {}
impl Solution {
    pub fn remove_duplicates(nums: &mut Vec<i32>) -> i32 {
        nums.dedup();
        nums.len() as i32
    }
}