mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-21 02:53:15 +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:
@ -45,7 +45,7 @@ public class UnionFind {
|
||||
}
|
||||
|
||||
public int count() {
|
||||
List parents = new ArrayList();
|
||||
List<Integer> parents = new ArrayList<>();
|
||||
for (int i = 0; i < p.length; i++) {
|
||||
if (!parents.contains(find(i))) {
|
||||
parents.add(find(i));
|
||||
|
Reference in New Issue
Block a user