Queue 和Stack的使用就不用多说吧,一个是先进先出,一个是后进先出. 这里我主要关注其实现原理. queue的实现如下: public class Queue<T> : IEnumerable<T>,System.Collections.ICollection,IReadOnlyCollection<T> { private T[] _array; private int _head; // First valid element in the queue pr…
//既然在这里开始,那就在这里结束. 实现stack 功能 ____coding _using subfunction to focus on the main aim of current function _void* is not allowed to do arithmetic operation _makde sure parameters are valid before using them,especially related to pointer. _____assert测试…