auto commit
BIN
docs/notes/pics/21550397584141.gif
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
docs/notes/pics/31550398353573.gif
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
docs/notes/pics/51550399426594.gif
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
docs/notes/pics/731a5e8f-a2c2-43ff-b8dd-6aeb9fffbe26.jpg
Normal file
After Width: | Height: | Size: 34 KiB |
|
@ -48,7 +48,7 @@
|
|||
|
||||
事务指的是满足 ACID 特性的一组操作,可以通过 Commit 提交一个事务,也可以使用 Rollback 进行回滚。
|
||||
|
||||
<div align="center"> <img src="pics/73846795-675b-496b-88b0-d44233fdcfba.jpg"/> </div><br>
|
||||
<div align="center"> <img src="pics/731a5e8f-a2c2-43ff-b8dd-6aeb9fffbe26.jpg"/> </div><br>
|
||||
|
||||
## ACID
|
||||
|
||||
|
|
|
@ -294,7 +294,7 @@ public abstract class Sort<T extends Comparable<T>> {
|
|||
|
||||
选择排序需要 \~N<sup>2</sup>/2 次比较和 \~N 次交换,它的运行时间与输入无关,这个特点使得它对一个已经排序的数组也需要这么多的比较和交换操作。
|
||||
|
||||
<div align="center"> <img src="pics/37e79a32-95a9-4503-bdb1-159527e628b8.png" width="250"/> </div><br>
|
||||
<div align="center"> <img src="pics/21550397584141.gif"/> </div><br>
|
||||
|
||||
```java
|
||||
public class Selection<T extends Comparable<T>> extends Sort<T> {
|
||||
|
@ -321,9 +321,7 @@ public class Selection<T extends Comparable<T>> extends Sort<T> {
|
|||
|
||||
在一轮循环中,如果没有发生交换,就说明数组已经是有序的,此时可以直接退出。
|
||||
|
||||
以下演示了在一轮循环中,将最大的元素 5 上浮到最右侧。
|
||||
|
||||
<div align="center"> <img src="pics/1a2f2998-d0da-41c8-8222-1fd95083a66b.png" width="250"/> </div><br>
|
||||
<div align="center"> <img src="pics/31550398353573.gif"/> </div><br>
|
||||
|
||||
```java
|
||||
public class Bubble<T extends Comparable<T>> extends Sort<T> {
|
||||
|
@ -359,7 +357,7 @@ public class Bubble<T extends Comparable<T>> extends Sort<T> {
|
|||
|
||||
以下演示了在一轮循环中,将元素 2 插入到左侧已经排序的数组中。
|
||||
|
||||
<div align="center"> <img src="pics/2a8e1442-2381-4439-a83f-0312c8678b1f.png" width="250"/> </div><br>
|
||||
<div align="center"> <img src="pics/51550399426594.gif"/> </div><br>
|
||||
|
||||
```java
|
||||
public class Insertion<T extends Comparable<T>> extends Sort<T> {
|
||||
|
|
BIN
docs/pics/21550397584141.gif
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
docs/pics/31550398353573.gif
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
docs/pics/51550399426594.gif
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
docs/pics/731a5e8f-a2c2-43ff-b8dd-6aeb9fffbe26.jpg
Normal file
After Width: | Height: | Size: 34 KiB |