mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-27 22:43:30 +08:00
Code cleanup (#4246)
This commit is contained in:
@ -3,7 +3,6 @@ package com.thealgorithms.datastructures.hashmap;
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
import com.thealgorithms.datastructures.hashmap.hashing.HashMapCuckooHashing;
|
||||
import java.util.*;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class HashMapCuckooHashingTest {
|
||||
@ -51,7 +50,6 @@ class HashMapCuckooHashingTest {
|
||||
@Test
|
||||
void removeNone() {
|
||||
HashMapCuckooHashing hashTable = new HashMapCuckooHashing(10);
|
||||
int initialSize = hashTable.getNumberOfKeysInTable();
|
||||
try {
|
||||
hashTable.deleteKeyFromHashTable(3);
|
||||
} catch (Exception e) {
|
||||
@ -90,11 +88,4 @@ class HashMapCuckooHashingTest {
|
||||
assertTrue(hashTable.checkTableContainsKey(10));
|
||||
assertTrue(hashTable.checkTableContainsKey(100));
|
||||
}
|
||||
|
||||
private HashMapCuckooHashing createHashMapCuckooHashing() {
|
||||
HashMapCuckooHashing hashTable = new HashMapCuckooHashing(10);
|
||||
int[] values = {11, 22, 33, 44, 55, 66, 77, 88, 99, 111, 222};
|
||||
Arrays.stream(values).forEach(hashTable::insertKey2HashTable);
|
||||
return hashTable;
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,6 @@ package com.thealgorithms.datastructures.hashmap.hashing;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
import com.thealgorithms.datastructures.hashmap.hashing.MajorityElement;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
Reference in New Issue
Block a user