![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
队列
A new o
这个作者很懒,什么都没留下…
展开
-
java实现双向循环队列
java实现双向循环队列/** * @author zx_jiao * @create 05-27 20:01 */public class CircleDeque<E> { private int front; private E[] elements; private int size; private static final int DEFAULT_CAPACITY = 10; public CircleDeque() {原创 2021-05-27 20:57:14 · 123 阅读 · 0 评论 -
java实现单向循环队列
java实现单向循环队列/** * @author zx_jiao * @create 05-23 22:20 */@SuppressWarnings("unchecked")public class CircleQueue<E> { private int front; private E[] elements; private int size; private static final int DEFAULT_CAPACITY = 10;原创 2021-05-27 20:56:20 · 100 阅读 · 0 评论 -
java实现双向队列
java实现双向队列/** * @author zx_jiao * @create 05-23 21:54 * 实现双向队列 */public class Deque<E> { //使用双向链表构建队列时间复杂度比较低 private LinkedList<E> list = new LinkedList<>(); //获取长度 public int size() { return list.size();原创 2021-05-27 20:55:11 · 798 阅读 · 0 评论 -
java实现单向队列
java实现单向队列public class Queue<E> { //使用双向链表构建队列时间复杂度比较低 private LinkedList<E> list = new LinkedList<>(); public int size() { return list.size(); } public boolean isEmpty() { return list.isEmpty();原创 2021-05-27 20:53:43 · 207 阅读 · 0 评论