fix(go): modify interface of stack, queue and deque

This commit is contained in:
reanon
2022-11-29 10:42:09 +08:00
parent d32f15feb1
commit 19469aecbf
7 changed files with 32 additions and 27 deletions

View File

@ -8,11 +8,13 @@ type Stack interface {
// Push 元素入栈
Push(num int)
// Peek 访问栈顶元素
Peek() int
Peek() any
// Pop 元素出栈
Pop() int
Pop() any
// Size 栈的长度
Size() int
// IsEmpty 栈是否为空
IsEmpty() bool
// toString 栈输出为字符串
toString() string
}