hi, in this sort function i need some help.....is this sort function sorting by swapping the values in the nodes, or does a swap by swapping the nodes itself , after comparing the values?
Code:void dList<Type>::sort() { for(nodeType<Type>* temp=first;temp != NULL; temp=temp->next) { nodeType<Type>* min = temp; for(nodeType<Type>* current = min; current != NULL; current=current->next) { if(current->info < min->info)min=current; } Type temp_var=temp->info; temp->info=min->info; min->info=temp_var; } }