/** * Integer linked list example * CSE 374 */ #ifndef LL_H #define LL_H // A single list node that stores an integer as data. typedef struct IntListNode { int data; struct IntListNode* next; } IntListNode; // Allocates a new node on the heap. IntListNode* makeNode(int data, IntListNode* next); // Builds a heap-allocated linked list with the values in the array. IntListNode* fromArray(int* array, int length); // Frees all nodes in the linked list. void freeList(IntListNode* list); // Prints the contents of the linked list. void printList(IntListNode* list); #endif