We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f1b2928 commit 80ed359Copy full SHA for 80ed359
src/main/java/g1301_1400/s1333_filter_restaurants_by_vegan_friendly_price_and_distance/Solution.java
@@ -4,7 +4,6 @@
4
5
import java.util.ArrayList;
6
import java.util.List;
7
-import java.util.stream.Collectors;
8
9
public class Solution {
10
public List<Integer> filterRestaurants(
@@ -18,6 +17,6 @@ public List<Integer> filterRestaurants(
18
17
}
19
20
list.sort((a, b) -> b[1] - a[1] == 0 ? b[0] - a[0] : b[1] - a[1]);
21
- return list.stream().map(restaurant -> restaurant[0]).collect(Collectors.toList());
+ return list.stream().map(restaurant -> restaurant[0]).toList();
22
23
0 commit comments