Resolve build errors & cleanup structure (#2334)

This commit is contained in:
Andrii Siriak
2021-09-26 12:26:59 +03:00
committed by GitHub
parent 355900226a
commit dfe189b21f
48 changed files with 418 additions and 1102 deletions

View File

@ -20,7 +20,7 @@ public class HashMapLinearProbing {
public HashMapLinearProbing(int hsize) {
this.buckets = new Integer[hsize];
this.hsize = hsize;
this.AVAILABLE = new Integer(Integer.MIN_VALUE);
this.AVAILABLE = Integer.MIN_VALUE;
this.size = 0;
}
@ -44,7 +44,7 @@ public class HashMapLinearProbing {
* @param key the desired key to be inserted in the hash map
*/
public void insertHash(int key) {
Integer wrappedInt = new Integer(key);
Integer wrappedInt = key;
int hash = hashing(key);
if (isFull()) {
@ -73,7 +73,7 @@ public class HashMapLinearProbing {
* @param key the desired key to be deleted
*/
public void deleteHash(int key) {
Integer wrappedInt = new Integer(key);
Integer wrappedInt = key;
int hash = hashing(key);
if (isEmpty()) {
@ -115,7 +115,7 @@ public class HashMapLinearProbing {
* @return int the index where the key is located
*/
public int findHash(int key) {
Integer wrappedInt = new Integer(key);
Integer wrappedInt = key;
int hash = hashing(key);
if (isEmpty()) {