Stack
stack
new virtuosity.structures.Stack();
Parameter |
Type |
Description |
Classes
Methods
Classes
Stack node
Methods
push
add a node to the stack
virtuosity.structures.Stack.push(data);
Parameter |
Type |
Description |
data |
ANY |
data for the new node |
pop
remove the top node
virtuosity.structures.Stack.pop();
peek
return the top node
virtuosity.structures.Stack.peek();
size
get the size of the Stack
virtuosity.structures.Stack.size();
print
output an array representation of the stack
virtuosity.structures.Stack.print();