import java.util.*; public class Gift { public static int getValue(int[] gifts, int n) { HashMap<Integer,Integer> map=new HashMap<>(); for (Integer x:gifts) { if(!map.containsKey(x)){ map.put(x,1); }else{ map.pu...