focus/stack/stack.go
2019-07-25 14:30:44 +08:00

21 lines
273 B
Go

package stack
type IStack interface {
Clear()
Empty() bool
Size() uint
// String 从左到右 左边第一个表示Top 如链表 a(top)->b->c
String() string
Values() []interface{}
Push(v interface{})
Pop() (interface{}, bool)
Peek() (interface{}, bool)
}