Skip to content

Commit 0ea5371

Browse files
committed
add
1 parent e1bafac commit 0ea5371

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

jiuzhangsuanfa/queue/queue.go

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
package queue
2+
3+
type Queue struct {
4+
Iterm []interface{}
5+
}
6+
7+
func NewQueue() *Queue {
8+
iter := make([]interface{}, 0)
9+
return &Queue{iter}
10+
}
11+
12+
func (q *Queue) Size() int {
13+
return len(q.Iterm)
14+
}
15+
16+
func (q *Queue) EnQueue(value interface{}) {
17+
q.Iterm = append(q.Iterm, value)
18+
}
19+
20+
func (q *Queue) DeQueue() interface{} {
21+
22+
}

0 commit comments

Comments
 (0)