mirror of
https://github.com/youngyangyang04/leetcode-master.git
synced 2025-07-08 00:43:04 +08:00
错误变量,上面都是resSet下面写成了setRes
This commit is contained in:
@ -143,9 +143,9 @@ class Solution {
|
|||||||
return resSet.stream().mapToInt(x -> x).toArray();
|
return resSet.stream().mapToInt(x -> x).toArray();
|
||||||
|
|
||||||
//方法2:另外申请一个数组存放setRes中的元素,最后返回数组
|
//方法2:另外申请一个数组存放setRes中的元素,最后返回数组
|
||||||
int[] arr = new int[setRes.size()];
|
int[] arr = new int[resSet.size()];
|
||||||
int j = 0;
|
int j = 0;
|
||||||
for(int i : setRes){
|
for(int i : resSet){
|
||||||
arr[j++] = i;
|
arr[j++] = i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user