Yes you're right, I have expressed myself wrong (I'm not english), what I'm suggesting is to insert each string into a binary search tree which is lg(N) on the average case, instead of making an insertion sort into a singly linked list, I'd make something like:
Originally Posted by iMalc
Isn't it better than doing an insertion sort into a singly linked list?
struct node* sorted_insert(struct node* node, char* string)
if(node == NULL) return newNode(string);
if(strcmp(string, node->string) <= 0) node->left = sorted_insert(node->left, string);
else node->right = sorted_insert(node->right, string);