#ifndef LIST_H #define LIST_H struct node { int data; struct node * next; } ; typedef struct node Node; typedef Node * List; typedef Node * NodePtr; void printList(List); void printRec(List); void printReverse(List); void addFront(List *, int); //add int to beginning of list void addTail(List *, int); // add int to end of list void addTailR(List *, int); // add int to end of list, recursive // delete int from list if it is there, return 1 success, 0 failure int delete(List *, int); int deleteR(List *, int); // recursive // get rid of entire list void clearList(List *); // find a value in the list, return pointer to containing node, or NULL NodePtr find(List, int); // replace first occurrence of old with new, return 1 success, 0 failure int replace(List, int old, int new); // insert in order if not duplicate, assumes list is ordered!! NodePtr insert(List *, int); #endif /* wget http://www.cs.jhu.edu/~joanne/cs120/notes/list.c */