package
Version:
v1.0.0
Opens a new window with list of versions in this module.
Published: Apr 20, 2023
License: MIT
Opens a new window with license information.
Imports: 0
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type Stack[T any] struct {
}
IsEmpty check if stack is empty
func (s *Stack[T]) MustPop() T
Peek returns the top element of the stack without removing it.
Pop and return top element of stack. Return false if stack is empty.
func (s *Stack[T]) Push(str T)
Push a new value onto the stack
Source Files
¶
Click to show internal directories.
Click to hide internal directories.