Closed bucket

private int hash(K key) {
	return Math.abs(key.hashCode()) % buckets.length ;
}


Open Bucket

private int hash(K key) {
	int h = 0;
	for (int i = 0; i<izbor.lenght() ; i++
	{
		h += zbor.ChatAt(i)*Math.pow(31,i) ;
	}
	return h ;
}