class Graphlb::DataStructures::Stack(A)
- Graphlb::DataStructures::Stack(A)
- Reference
- Object
Overview
A stack Data Structure formed using an Array A stack follows Last-in-First-out
Defined in:
graphlb/data_structures/stack.crConstructors
-
.new
Initializes the stack with empty
Instance Method Summary
-
#empty?
returns true if the stack is empty
-
#pop
pops the value that is last inserted
-
#push(val)
pushes the value present inside the val into the stack
-
#top
returns the top-most element in the stack
-
#values
returns all the values that are present in the stack