Hi :)
I have a question, if you don't mind =]
(What is the situation where quadratic probing is better than chaining?)
I guess (as I'm thinking)
while searching? maybe? because if the Hashtable have a lot of elements in chaining it'll take a lot of time searching the Hashtable and it might some places in the HashTable that they don't have keys (values)..
<< Is what I'm saying right for the question? or, do you have other solution?
thanks :)
+++++++
Last question it is in the HW:
Write a member function to reverse a singly linked list using only one pass through the list??
<< my answer for this question that It'll be like the code below
node *ptr1 = head;
bool reverse( int x )
{
if( !head ) // to check if the linked list is empty
return false;
return reverse( ptr1 -> data ); // recursive
}
Is all my answers are right?
Thanks in advance my friends :)