Skip to content

Commit e02fd14

Browse files
committed
feat : Data structure linked list golang
1 parent d2b039e commit e02fd14

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

main.go

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package main
2+
3+
import "fmt"
4+
5+
type Node struct {
6+
data int
7+
next *Node
8+
}
9+
type LinkedList struct {
10+
head *Node // test1 int, test2 Node, test3 int, test4 *Node
11+
}
12+
13+
func main() {
14+
var test1 Node
15+
test1.data = 1
16+
test1.next = nil
17+
18+
fmt.Println("test1.data: ", test1.data, "test1.next: ", test1.next)
19+
}

0 commit comments

Comments
 (0)