fn main() { println!("Hello, world!"); } struct Solution {} impl Solution { pub fn find_duplicate(nums: Vec) -> i32 { for i in 0..nums.len()-1 { if nums[i+1..nums.len()].contains(&nums[i]) { return nums[i]; } } 0 } }