Professional Documents
Culture Documents
class hashNode{
String key;
int data;
class hashTable{
hashNode[] table;
int capacity = 5;
hashTable(){
int i;
int hasil = 0;
hasil = hasil%capacity;
return hasil;
h.data = data;
h.key = key;
table[idx] = h;
checkLoad();
void display(){
if (table[i] != null) {
void checkLoad(){
int load = 0;
if (table[i] != null) {
load++;
}
if (load == capacity) {
temp[i] = table[i];
capacity = capacity*2;
table[i] = temp[i];
h.put("Judi", 100);
h.put("roma", 85);
h.put("ani", 75);
h.display();
}
}