The most importat thing is to realize that you need a struct with a pointer, to the next one.
After you realize that, you only need to loop over -> next, and set values.
Remember all elements should have a field pointing to the next one, for example, Element *next.
Top comments (0)