#ifndef DANS_LIST_DOT_H #define DANS_LIST_DOT_H const int MAX_LENGTH = 10; typedef int ItemType; struct node { ItemType data; int next; }; const int NIL = -1; class List { public: List(); // construct an empty list bool IsEmpty() const; // true if the list is empty bool IsFull() const; // true if the list is full int Length() const; // the length of the list void Insert(ItemType item); // insert item into the list void Delete(ItemType item); // delete item from the list bool IsPresent(ItemType item) const ; //is the item present void Print() const; // print the list // two new routines void PrintFreelist() ; // print the free list void PrintDS() ; // print the data structure private: node datalist[MAX_LENGTH]; int head, // the beginning of the list free; // the beginning of the free list }; #endif