代码更新

This commit is contained in:
2022-08-25 11:00:54 +08:00
parent 26c90f894c
commit eed38ad91b
43 changed files with 58165 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 205 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 200 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 KiB

BIN
java/java 基础/SQL.xmind Normal file

Binary file not shown.

View File

@@ -0,0 +1,38 @@
## 1 数据结构分类
数据结构中,数组和链表是物理结构,即在内存中实际的储存方式(有序、无序)
### 1.1 线性结构
#### 1.1.1 数组
1.数组作为一段连续的存储相同类型变量的有序集合,每个元素都有从0开始的唯一索引;而因为其在内存中连续且顺序存储
2.对于数组而言,常见的增删改查时间复杂度如下:
- 带下标查找O(1);
- 不带下表查找,如果为遍历则为O(n),如果为有序数组,采用二分查找发,为O(logn);
- 增、删涉及到元素的移动,复杂度为O(n);
- 改只用根据索引查找改动,复杂度为O(1);
#### 1.1.2 链表
1.链表则是在物理上非连续、非顺序的数据结构,存储的方式时随机存储,有若干节点(node)组成;其中分为单项链表和双向链表,data为存储的数据,next指针指向下一节点,其中尾节点(最后一个节点)next指针指向空,而双向链表多了一个prev节点,指向上一节点,同样其首节点(第一个节点)prev节点指向空
2.对于链表而言,常见的增删改查时间复杂度如下:
- 查找需要遍历整个链表,所以复杂度为O(n);
- 增删(不考虑找到指定位置操作)时,只需处理节点的及其前、后置节点的引用即可,复杂度为O(1);
- 改(不考虑找到指定位置操作)时,只用修改data同样复杂度为O(1);
​
#### 1.1.3 栈和队列
1.栈是一种线性逻辑结构,其中元素只能先进后出(FILO),最早进入的元素在栈顶(bottom),最后(进入)的元素在栈顶(top),而其既能使用数组实现,也能使用链表实现;
2.栈的常见操作有入栈(push)和出栈(pop),入栈即新增一个元素成为栈顶,出栈即将栈顶元素弹出,前一个元素成为新的栈顶;
3.队列同样是一种线性结构,但是其元素是采用先进先出(FIFO),队列的出口端叫作队头(front),队列的入口端叫作队尾(rear),同样可以使用数组或者链表来实现;
4.队列的常见操作有入队(enqueue)和出队(dequeue),入队即把新元素放在队尾,队尾的下一位置称为新的队尾,出队则是把队头的元素移出队列,队头的后一元素成为新的队头;