-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
61 lines (53 loc) · 1.13 KB
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
package main
import (
"net/http"
"net/url"
"github.com/bablzz/algowithgo/pkg/algo"
)
type Opts struct {
URL string
RawResponse string
Method string
Status int
Mux *http.ServeMux
QueryParams url.Values
}
type Foo struct {
aa bool
ccc bool
bb int32
}
func main() {
// var linkedList algo.LinkedList
// linkedList = algo.LinkedList{}
// linkedList.AddToHead(5)
// linkedList.AddToEnd(1)
// linkedList.AddToEnd(3)
// linkedList.AddToEnd(7)
// linkedList.AddToEnd(3)
// linkedList.IterateList()
// exercise.EvenOdd(&linkedList)
// fmt.Print("\n")
// linkedList.IterateList()
// type Key string
//
// key := "Bond"
// ctx := context.WithValue(context.Background(), key, "James")
// ctx = context.WithValue(ctx, key, "007")
// fmt.Println(ctx.Value(key))
// nums := []int{2,3,4,-3,-4,5,8,15,10,6,7}
// target := 10
// fmt.Print(algo.SumOfThree(nums, target))
// fmt.Print(algo.MissNumber([]int{1, 2, 4, 5, 6}))
// s := algo.NewStack()
// s.Staked(5)
// s.Staked(7)
// s.UnStaked()
// s.Staked(8)
// s.Display()
q := algo.NewQueue()
q.Queued(5)
q.Queued(7)
q.DeQueued()
q.Display()
}