Skip to content

Commit 5ea09a9

Browse files
authored
Merge branch 'master' into refactor/cycle_sort
2 parents 8e49771 + 5bc96cf commit 5ea09a9

File tree

3 files changed

+2
-6
lines changed

3 files changed

+2
-6
lines changed

.gitpod.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM gitpod/workspace-java-21:2024-06-24-08-46-07
1+
FROM gitpod/workspace-java-21:2024-06-26-08-49-45
22

33
ENV LLVM_SCRIPT="tmp_llvm.sh"
44

spotbugs-exclude.xml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,6 @@
8989
<Match>
9090
<Bug pattern="RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE" />
9191
</Match>
92-
<Match>
93-
<Bug pattern="RV_ABSOLUTE_VALUE_OF_HASHCODE" />
94-
</Match>
9592
<!-- fb-contrib -->
9693
<Match>
9794
<Bug pattern="OCP_OVERLY_CONCRETE_PARAMETER" />

src/main/java/com/thealgorithms/datastructures/hashmap/hashing/GenericHashMapUsingArray.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@ public void put(K key, V value) {
4747

4848
// tells which bucket to go to
4949
private int hashFunction(K key) {
50-
int hc = key.hashCode();
51-
return Math.abs(hc) % buckets.length;
50+
return Math.floorMod(key.hashCode(), buckets.length);
5251
}
5352

5453
private void reHash() {

0 commit comments

Comments
 (0)