public void Add(T1 element) { var hash = hashGenerator.GetHash(element, size); var node = new LinearNode <T1>(element); Add(node, hash); }
private void Add(LinearNode <T1> node, int hash) { Console.WriteLine(hash); if (valueArray[hash] == null) { valueArray[hash] = node; } else { if (valueArray[hash].value.CompareTo(node.value) == 0) { return; } var counter = hash + 1; if (counter >= size) { counter = counter - (size); } Add(node, counter); } }