摘要: class MyQueue: """ 头指针front指向队头元素,尾指针rear指向队尾元素的下一个位置 牺牲一个空间位置用于区分队空队满 """ def __init__(self, capacity): self.capacity = capacity self.data = [None] * 阅读全文
posted @ 2020-09-02 13:44 该搬砖啦 阅读(190) 评论(0) 推荐(0) 编辑