We were unable to load Disqus. If you are a moderator please see our troubleshooting guide.
I think the last function should take the vector by reference, like this:pub fn single_number(nums: &Vec<i32>) -> i32 { ... }Without it, it requires (and consumes the) ownership for no reason.
pub fn single_number(nums: &Vec<i32>) -> i32 { ... }
I think the value of a&b (a=F b=T) should be 0 in the truth table.
I think the last function should take the vector by reference, like this:
pub fn single_number(nums: &Vec<i32>) -> i32 { ... }
Without it, it requires (and consumes the) ownership for no reason.