标签:div ret pair repeat span pre tco ack ++
int numIdenticalPairs(int* nums, int numsSize){ int hash[101] = {0}; int ret = 0; for(int i = 0; i < numsSize; i++) { hash[nums[i]]++; ret += hash[nums[i]] - 1; } return ret; }
标签:div ret pair repeat span pre tco ack ++
原文地址:https://www.cnblogs.com/ganxiang/p/13665742.html