Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
You are right!
They just did not test for it in the end I guess... so it passes without distinct....
The description explicitly states that you have to filter out duplicates in the returned array.
distinct is redundant
A stream in a stream... Dude... lmaooooooo
wov!
I love this solution
创建一个空的字符串数组,相当于
new String[]{}
String[]::new能告诉我这个是什么意思吗
This comment is hidden because it contains spoiler information about the solution
This is still O(array1.length * array2.length) - just as yours.
Replacing loops with streams is not taking away complexity.
Wouldn't it make more sense to save a reference to Arrays.stream(array2) instead of invoking it in filter() for each element of array1?