| 12345678910111213141516171819202122232425262728293031323334353637 |
- package modules
-
- import (
- "fmt"
- "testing"
- )
-
- func Test_simpleLList_pbNtraverse(t *testing.T) {
- mylist := new(LList)
- mylist.PushBack(30)
- mylist.PushBack(40)
- mylist.PushBack(20)
- mylist.PushBack(10)
- ptr := mylist.head
- for ptr != nil {
- fmt.Printf("data = %d, address = %p\n", ptr.val, ptr.next)
- ptr = ptr.next
- }
- }
-
- func Test_simpleLList_mergeSort(t *testing.T) {
- mylist := new(LList)
- mylist.PushBack(30)
- mylist.PushBack(40)
- mylist.PushBack(20)
- mylist.PushBack(10)
- mylist.head = MergeSort(mylist.head, mylist.size / 2)
- ptr := mylist.head
- for ptr != nil {
- fmt.Printf("data = %d, address = %p\n", ptr.val, ptr.next)
- ptr = ptr.next
- }
- }
-
- func Test_removeArray(t *testing.T){}
- func Test_deleteList(t *testing.T){}
- func Test_insertList(t *testing.T){}
|