文件名称:扩展矩阵leetcode-Algorithms-camp:算法营
文件大小:1.19MB
文件格式:ZIP
更新时间:2024-07-20 20:48:45
系统开源
扩展矩阵leetcode [toc] codetop统计 二叉树 144, JD- 94, JD- 一、基础 1. 常见的数据结构 1.1 队列、栈 名称 说明 Solution1 Solution2 用数组实现固定栈 用数组实现固定队列 225-用队列实现栈 232-用栈实现队列 208-实现Trie树 1188-设计有限阻塞队列 生产者消费者模式 1.2 Trie树/字典树 1.3 2、树 Title Solution1 Solution2 Addition1-java、python中提供的数据结构 1、java 1.1 Queue Queue, Deque。 Queue继承于Collection,且 Deque是Queue的子类 ArrayDeque实现了Deque接口,LinkedList实现了Deque,List接口 (1)对比: ArrayDeque 为数组结构,插入元素不能为null,无法确定数据量时,后期扩容会影响效率 LinkedList 链表结构,插入元素不能为null,无法确定数据量时,后期扩容会影响效率 (2)用法 Deque 作为stack: 出栈:poll(