: hi,
: i'm a newbie
: my problem
: is the implementation of insertion sort method using the linked list of string elements ;
: it's easy do it using arrays and i did it
: but with pointer it's really hard
: anyone can help me or just tell me where i can find any help
: thx a lot
: ed.nor.
:
Some tips:
Definition of the structure
typedef struct link_s
{
char *s;
struct link_s *next;
}
LINK;
The field "next" is used to link the elements together. When you want to insert element Y after element X, you can do:
Y->next=X->next;
X->next=Y;
These are the basics. Now you should try to write some code and post it if you encounter any problem.
Steph