i have a struct
struct node
{
int item;
node* next;
};
is this the correct implementation of insert sort
void insertsort(struct node ** headref){
struct node* result = NULL;
struct node* current = *headref;
struct node* next;
while (current !=NULL){
next = current->next;
sortedinsert(&result, current);
current = next;
}
*headref = result;
}