We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
publicstaticintsockMerchant(intn,List<Integer>ar){// Write your code hereintcount=0;HashMap<Integer,Integer>map=newHashMap<>();for(Integeri:ar){if(!map.containsKey(i))map.put(i,1);else{map.put(i,map.get(i)+1);if(map.get(i)%2==0)count++;}}returncount;}
Sales by Match
You are viewing a single comment's thread. Return to all comments →
java solution