package
module
Version:
v0.0.0-...-735ead8
Opens a new window with list of versions in this module.
Published: Jul 13, 2023
License: MIT
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
Documentation
¶
Stack is a generic stack implementation.
NewStack returns a new stack.
func (s *Stack[T]) Clear()
Clear clears the stack.
IsEmpty returns true if the stack is empty.
Len returns the length of the stack.
func (s *Stack[T]) Pop() T
Pop removes and returns the last element of the stack.
func (s *Stack[T]) Push(v T)
NewStack returns a new stack.
String returns a string vector representation of all elements in stack.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.