-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinterfaces.go
84 lines (72 loc) · 1.35 KB
/
interfaces.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
package ds
type Set_I interface {
Size() int
Empty() bool
AddElem(interface{})
DelElem(interface{})
Exist(interface{}) bool
}
type Multiset_I interface {
Set_I
Decrement_Element(interface{})
Size_With_Duplicates() int
Count(interface{}) int
}
type Extended_Set_I interface {
Set_I
Union(Extended_Set_I) Extended_Set_I
Intersect(Extended_Set_I) Extended_Set_I
Difference(Extended_Set_I) Extended_Set_I
}
type Disjoint_Set_I interface {
Find(int) int
Union(int, int)
Print()
}
type Priority_Queue_I interface {
Push(interface{}, float64)
Pop() interface{}
}
type Deque_I interface {
Empty() bool
Size() int
Front() interface{}
Back() interface{}
Push_Front(interface{})
Push_Back(interface{})
Pop_Front() interface{}
Pop_Back() interface{}
Print()
}
type Queue_I interface {
Empty() bool
Size() int
Front() interface{}
Push(interface{})
Pop() interface{}
Print()
}
type Stack_I interface {
Empty() bool
Size() int
Top() interface{}
Push(interface{})
Pop() interface{}
}
type Two_Dimensional_Array_I interface {
Size() (int, int)
SetElem(int, int, interface{})
GetElem(int, int) interface{}
}
type Tree_I interface {
IsLeaf() bool
AddChild(Tree_I)
AddChildWithValue(interface{})
GetChildren() []Tree_I
}
type Binary_Tree_I interface {
GetLeftSubtree() Binary_Tree_I
GetRightSubtree() Binary_Tree_I
}
type Graph_I interface {
}