Skip to content

Commit da5bb6c

Browse files
committed
feat: update list dir
1 parent 02275ed commit da5bb6c

File tree

8 files changed

+578
-11
lines changed

8 files changed

+578
-11
lines changed

01_list/00_img/01_链表.drawio.svg

Lines changed: 352 additions & 0 deletions
Loading
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

01_list/03_q1_list_bug/main.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package main
2+
3+
import (
4+
"container/list"
5+
"fmt"
6+
)
7+
8+
func main() {
9+
l := list.List{}
10+
e := l.PushBack(10)
11+
12+
l = list.List{}
13+
l.Remove(e)
14+
fmt.Println("list len: ", l.Len())
15+
}

02_array/00_img/01_array.drawio.svg

Lines changed: 209 additions & 0 deletions
Loading

99_others/Graph/Graph_test.go

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,9 @@
11
package Graph
22

33
import (
4-
"fmt"
5-
"testing"
4+
"testing"
65
)
76

87
func TestGraph(t *testing.T) {
9-
graph := BuildGraph("test.txt")
10-
fmt.Println(graph)
11-
e := graph[1].FisrtEdge
12-
for e != nil {
13-
if e.v != 2 || e.weight != 3 {
14-
t.Fatal("错误:建图失败,e.v!=2,e.weight!=3")
15-
}
16-
e = e.next
17-
}
8+
189
}

0 commit comments

Comments
 (0)