给你一个整数map,返回val最大的key,如果val相等,返回key最小的val
hashmap := map[int]int{0:1,2:2,4:2}
hashmap
fre,v=-1,0
for key,val := range hashmap{
if fre == -1{
fre=val
v=key
}else if val > fre{
fre=val
v=key
}else if val == fre && key < v{
fre=val
v=key
}
}
return v