From abc08b6bb6f698135efe52ad0a7f20b333d32173 Mon Sep 17 00:00:00 2001 From: FrankLin Date: Fri, 1 Apr 2022 11:01:00 -0400 Subject: [PATCH] correct comments of C version of Leetcode349 --- problems/0349.两个数组的交集.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/problems/0349.两个数组的交集.md b/problems/0349.两个数组的交集.md index 64d80a37..45f19b6e 100644 --- a/problems/0349.两个数组的交集.md +++ b/problems/0349.两个数组的交集.md @@ -294,17 +294,17 @@ int* intersection1(int* nums1, int nums1Size, int* nums2, int nums2Size, int* re int i; - //Calculate the number's counts for nums1 array + /* Calculate the number's counts for nums1 array */ for(i = 0; i < nums1Size; i ++) { nums1Cnt[nums1[i]]++; } - //Check if the value existing in nums1 count array + /* Check if the value in nums2 is existing in nums1 count array */ for(i = 0; i < nums2Size; i ++) { if(nums1Cnt[nums2[i]] > 0) { result[resultIndex] = nums2[i]; resultIndex ++; - //Clear this count to avoid duplicated value + /* Clear this count to avoid duplicated value */ nums1Cnt[nums2[i]] = 0; } }