Beispiel #1
0
        public void Enqueue(int x)
        {
            kol newKol = new kol(x);

            if (gora == null)
            {
                gora = newKol;
                q    = gora;
                return;
            }
            q.next = newKol;
            q      = newKol;
        }
Beispiel #2
0
        public void Dequeue()
        {
            if (this.Empty())
            {
                return;
            }

            if (gora == q)
            {
                gora = null;
                q    = null;
                return;
            }

            gora = gora.next;
        }