摘要:
8.4 :数组实现栈 数组 + index控制 阅读全文
posted @ 2022-05-08 11:39
yzmarcus
阅读(16)
评论(0)
推荐(0)
摘要:
8.3:数组实现队列(难) 用size解耦 pushi和polli 1 //数组实现队列,先进先出 2 //通过size解耦end和begin 3 public static class MyQueue { 4 private int[] arr; 5 private int end; // pus 阅读全文
posted @ 2022-05-08 10:57
yzmarcus
阅读(25)
评论(0)
推荐(0)
摘要:
8.2:双向链表实现栈 底层都是双链表调整 1 public static class Node<T> { 2 public T value; 3 public Node<T> last; 4 public Node<T> next; 5 6 public Node(T data) { 7 valu 阅读全文
posted @ 2022-05-08 10:56
yzmarcus
阅读(234)
评论(0)
推荐(0)
摘要:
8.1:双向链表实现双端队列 双端队列,玩的head 和tail指针 底层都是双链表调整 1、双向链表 节点1 public static class Node<T> { 2 public T value; 3 public Node<T> last; 4 public Node<T> next; 阅读全文
posted @ 2022-05-08 10:50
yzmarcus
阅读(46)
评论(0)
推荐(0)
摘要:
8:栈和队列 逻辑概念: 栈:数据先进后出,犹如弹匣 队列:数据先进先出,好似排队 栈和队列的实现: 1、双向链表实现 2、数组实现 阅读全文
posted @ 2022-05-08 10:41
yzmarcus
阅读(27)
评论(0)
推荐(0)

浙公网安备 33010602011771号