/*********************************** _INTSLL.h **************************************
Singly-Linked list class to store integers.
By George Labaria
Bibliography: Data Structures and Algorithms in C++ by: Adom Drozdek 2001
************************************************************************************/

class NodeInt
{
     public:
            int info;
            NodeInt *next;
            NodeInt(int n, NodeInt *point = 0) { info = n; next = point; }
};

class SllList
{
     private:
             NodeInt *head, *tail;
     
     public:
            SllList() { head = tail = 0; }
            ~SllList();
            int isEmpty() { return head == 0; }
            void addHead(int);
            void addTail(int);
            int deleteHead(); // delete head and return info
            int deleteTail(); // delete tail and return info
            void deleteNode(int);
            bool InList(int) const;
};