两个数组的交集(力扣

/**
 * Note: The returned array must be malloced, assume caller calls free().
 */
int* intersection(int* nums1, int nums1Size, int* nums2, int nums2Size, int* returnSize) {
    int hash[1001],i=0,j=0;
    int* ret=(int*)malloc(1001*sizeof(int));
    memset(hash,0,sizeof(hash));
    memset(ret,0,sizeof(ret));
    *returnSize=0;
    while(i

你可能感兴趣的:(leetcode,哈希算法,散列表)