Skip to content

Commit 5113811

Browse files
committed
错误变量,上面都是resSet下面写成了setRes
1 parent 7e3d2c7 commit 5113811

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

problems/0349.两个数组的交集.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,9 @@ class Solution {
143143
return resSet.stream().mapToInt(x -> x).toArray();
144144

145145
//方法2:另外申请一个数组存放setRes中的元素,最后返回数组
146-
int[] arr = new int[setRes.size()];
146+
int[] arr = new int[resSet.size()];
147147
int j = 0;
148-
for(int i : setRes){
148+
for(int i : resSet){
149149
arr[j++] = i;
150150
}
151151

0 commit comments

Comments
 (0)