mirror of
https://github.com/youngyangyang04/leetcode-master.git
synced 2025-07-08 00:43:04 +08:00
@ -138,7 +138,8 @@ class Solution {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//方法1:直接将结果几何转为数组
|
//方法1:将结果集合转为数组
|
||||||
|
|
||||||
return resSet.stream().mapToInt(x -> x).toArray();
|
return resSet.stream().mapToInt(x -> x).toArray();
|
||||||
|
|
||||||
//方法2:另外申请一个数组存放setRes中的元素,最后返回数组
|
//方法2:另外申请一个数组存放setRes中的元素,最后返回数组
|
||||||
|
Reference in New Issue
Block a user