mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-24 04:54:21 +08:00
Parameterize references to generic types. (#5078)
* chore: remove unused imports * fix: parameterize references to generic types --------- Co-authored-by: vil02 <65706193+vil02@users.noreply.github.com>
This commit is contained in:
@ -75,7 +75,7 @@ public class ThreeSumProblem {
|
||||
|
||||
public List<List<Integer>> Hashmap(int[] nums, int target) {
|
||||
Arrays.sort(nums);
|
||||
Set<List<Integer>> ts = new HashSet();
|
||||
Set<List<Integer>> ts = new HashSet<>();
|
||||
HashMap<Integer, Integer> hm = new HashMap<>();
|
||||
|
||||
for (int i = 0; i < nums.length; i++) {
|
||||
@ -94,6 +94,6 @@ public class ThreeSumProblem {
|
||||
}
|
||||
}
|
||||
}
|
||||
return new ArrayList(ts);
|
||||
return new ArrayList<>(ts);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user