/* skeleton file for Ordered_container_list.c The struct declarations below must be used for the linked-list node and Ordered_container objects. Remove this comment and complete this file with all necessary code. */ /* struct LL_Node structure declaration. This declaration is local to this file. This is a two-way or doubly-linked list. Each node has a pointer to the previous node and another pointer to the next node in the list. This means insertions or removals of a node can be made in constant time, once the location has been determined. */ struct LL_Node { struct LL_Node* prev; /* pointer to the previous node */ struct LL_Node* next; /* pointer to the next node */ void* data_ptr; /* uncommitted pointer to the data item */ }; /* Declaration for Ordered_container. This declaration is local to this file. A pointer is maintained to the last node in the list as well as the first, meaning that additions to the end of the list can be made in constant time. The number of nodes in the list is kept up-to-date in the size member variable, so that the size of the list can be accessed in constant time. */ struct Ordered_container { OC_comp_fp_t comp_func; struct LL_Node* first; struct LL_Node* last; int size; };