Skip to content

Commit 07aace8

Browse files
committed
Improved solution
1 parent 6404c97 commit 07aace8

File tree

1 file changed

+0
-18
lines changed
  • src/main/java/g3601_3700/s3636_threshold_majority_queries

1 file changed

+0
-18
lines changed

src/main/java/g3601_3700/s3636_threshold_majority_queries/Solution.java

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import java.util.HashMap;
77
import java.util.List;
88
import java.util.Map;
9-
import java.util.Objects;
109
import java.util.TreeSet;
1110

1211
class Solution {
@@ -27,23 +26,6 @@ public int compareTo(FreqPair other) {
2726
}
2827
return Integer.compare(other.value, this.value);
2928
}
30-
31-
@Override
32-
public boolean equals(Object o) {
33-
if (this == o) {
34-
return true;
35-
}
36-
if (o == null || getClass() != o.getClass()) {
37-
return false;
38-
}
39-
FreqPair fp = (FreqPair) o;
40-
return count == fp.count && value == fp.value;
41-
}
42-
43-
@Override
44-
public int hashCode() {
45-
return Objects.hash(count, value);
46-
}
4729
}
4830

4931
// A helper class to store a query's range and its original index.

0 commit comments

Comments
 (0)