there was a queston in which we have to return count of duplicates
we are given a vector of names, weight and price
for example
name {bat,bag,golf,golf,golf}
weight {2,3,1,1,1}
price {5,6,2,8,2}
hashmap would look like
bat 2 5
bag 3 6
golf 1 2
golf 1 8
golf 1 2
output = 2
what is wrong in this function https://ideone.com/3x8aln