1use std::collections::HashSet;23impl Solution {4 pub fn distribute_candies(candy_type: Vec<i32>) -> i32 {5 let len = candy_type.len();6 let hashset: HashSet<i32> = candy_type.into_iter().collect();7 std::cmp::min(len / 2, hashset.len()) as i328 }9}
WPM •0 •0
ACC •0 •0
TIME •0