Stack queue

Queue (Queue) is a set of objects FIFO.

Count: Get the number of elements contained in the Queue

Clear (): Removes all the elements from the Queue

Contains (object obj): determine whether an element is in the Queue

Dequeue (): Removes and returns the object at the beginning of the Queue

Enqueue (object obj): Adds an object to the end of Queue

ToArray (): Copy Queue to a new array

TrimToSize (): Set the number of elements in the actual capacity of Queue

Stack is a "last in first out" (Last In First Out, LIFO) linear structure.

Only a single stack as if some warehouse entrances, every member allows only one stack of goods entered, (stack), and then taken out to obtain a member (the stack), or not allowed to put out the goods from the intermediate .

Insertion of data elements called stack during the stack (push)

Remove elements is called a stack (pop)

Guess you like

Origin www.cnblogs.com/lcy0930/p/11202078.html