hello-algo/codes/go/pkg/list_node_test.go

20 lines
325 B
Go
Raw Normal View History

2022-11-25 20:24:51 +08:00
// File: list_node_test.go
// Created Time: 2022-11-25
// Author: Reanon (793584285@qq.com)
package pkg
import (
"fmt"
"testing"
)
2022-11-25 20:24:51 +08:00
func TestListNode(t *testing.T) {
arr := []int{2, 3, 5, 6, 7}
2022-11-26 01:17:48 +08:00
head := ArrayToLinkedList(arr)
2022-11-25 20:24:51 +08:00
PrintLinkedList(head)
node := GetListNode(head, 5)
fmt.Println("Find node: ", node.Val)
2022-11-25 20:24:51 +08:00
}