Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
6pointers. See problem #8 and its solution for a complete example with drawings. Formore detailed explanations, see the resources listed on page 1.3) Build — At Head With Push()The easiest way to build up a list is by adding nodes at its "head end" with Push(). Thecode is short and it runs fast — lists naturally support operations at their head end. Thedisadvantage is that the elements will appear in the list in the reverse order that they areadded. If you don't care about order, then the head end is the best.struct node* AddAtHead() {struct node* head = NULL;int i;for (i=1; i