Bug fixes and improvements (#1078)
* Fix the logo in the en version * Optimize header color and fix body background color * Update theme switch's name * Fix backfrop-filter on Safari * Update some animation's file name for adding egde when cropping * Re-count the comments number * A bug fix in n_queens_problem.md
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
@ -12,19 +12,19 @@
|
||||
- **初始化**:传入 $n$ 个顶点,初始化长度为 $n$ 的顶点列表 `vertices` ,使用 $O(n)$ 时间;初始化 $n \times n$ 大小的邻接矩阵 `adjMat` ,使用 $O(n^2)$ 时间。
|
||||
|
||||
=== "初始化邻接矩阵"
|
||||

|
||||

|
||||
|
||||
=== "添加边"
|
||||

|
||||

|
||||
|
||||
=== "删除边"
|
||||

|
||||

|
||||
|
||||
=== "添加顶点"
|
||||

|
||||

|
||||
|
||||
=== "删除顶点"
|
||||

|
||||

|
||||
|
||||
以下是基于邻接矩阵表示图的实现代码:
|
||||
|
||||
@ -43,19 +43,19 @@
|
||||
- **初始化**:在邻接表中创建 $n$ 个顶点和 $2m$ 条边,使用 $O(n + m)$ 时间。
|
||||
|
||||
=== "初始化邻接表"
|
||||

|
||||

|
||||
|
||||
=== "添加边"
|
||||

|
||||

|
||||
|
||||
=== "删除边"
|
||||

|
||||

|
||||
|
||||
=== "添加顶点"
|
||||

|
||||

|
||||
|
||||
=== "删除顶点"
|
||||

|
||||

|
||||
|
||||
以下是邻接表的代码实现。对比上图,实际代码有以下不同。
|
||||
|
||||
|
||||