Exemplo n.º 1
0
 public T Dequeue()
 {
     if (isEmpty())
     {
         return(default(T));
     }
     else
     {
         T i = Queue.Get(0);
         Queue.Remove(0);
         return(i);
     }
 }
Exemplo n.º 2
0
 public T Pop()
 {
     if (isEmpty())
     {
         return(default(T));
     }
     else
     {
         T i = Stack.Get(Stack.Size - 1);
         Stack.Remove(Stack.Size - 1);
         return(i);
     }
 }