mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-08 10:15:51 +08:00
Fix compare() for subset check (S.A ⊆ T.A) (#4978)
This commit is contained in:
@ -50,7 +50,7 @@ public class GSet<T> {
|
||||
* @return true if the current G-Set is a subset of the other, false otherwise
|
||||
*/
|
||||
public boolean compare(GSet<T> other) {
|
||||
return elements.containsAll(other.elements);
|
||||
return other.elements.containsAll(elements);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user