Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LinkStack ¶
type LinkStack struct {
// contains filtered or unexported fields
}
LinkStack 链表实现的堆栈
func NewLinkStack ¶
func NewLinkStack() *LinkStack
type StaticStack ¶
type StaticStack struct {
// contains filtered or unexported fields
}
StaticStack 数组实现的堆栈
func NewStaticStack ¶
func NewStaticStack(size int) *StaticStack
func (*StaticStack) Capacity ¶
func (s *StaticStack) Capacity() int
func (*StaticStack) Clear ¶
func (s *StaticStack) Clear()
func (*StaticStack) Length ¶
func (s *StaticStack) Length() int
func (*StaticStack) Peek ¶
func (s *StaticStack) Peek() (interface{}, bool)
func (*StaticStack) Pop ¶
func (s *StaticStack) Pop() (interface{}, bool)
func (*StaticStack) Push ¶
func (s *StaticStack) Push(i interface{}) bool
Click to show internal directories.
Click to hide internal directories.