Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Stack ¶
type Stack struct {
Head *node
// contains filtered or unexported fields
}
Stack represents the linked list implementation of the stack.
func InitStack ¶
func InitStack() *Stack
InitStack initializes and returns a reference to a new stack instance.
func (*Stack) Peek ¶
Peek returns the top most element of the stack or an error if the stack is empty.
func (*Stack) Pop ¶
Pop deletes the top most element of the stack and returns it or returns an error if the stack is empty.
Click to show internal directories.
Click to hide internal directories.