To count the no.of times an element occurs in a vector. For example : let v = vec![1,1,1,1,2,2,3,3,4]; I would like to know the count of 1,2,3,4 as 4,2,2,1 ...
確定! 回上一頁