Пример #1
0
        public void InsertFirst(T Element)
        {
            DoublyNode <T> newNode = new DoublyNode <T>();

            newNode.elem = Element;

            if (isEmpty() == true)
            {
                Head = newNode;
            }
            else
            {
                newNode.Next  = Head;
                Head.Previous = newNode;
                Head          = newNode;
            }
            size++;
        }