From charlesreid1

Line 11: Line 11:


Link to code: https://charlesreid1.com:3000/cs/java/src/master/stacks-queues-deques/stacks/ArrayStack.java
Link to code: https://charlesreid1.com:3000/cs/java/src/master/stacks-queues-deques/stacks/ArrayStack.java
==Source Code==
<pre>
your code here
</pre>


==Flags==
==Flags==

Revision as of 07:37, 3 June 2017

ArrayStack

Stack interface:

  • size() - get the number of elements currently in the stack
  • isEmpty() - returns true if stack is empty
  • push() - add the given item to the top of the stack
  • pop() - remove the top item in the stack and return it
  • peek() - return reference to top item in stack, but do not remove it

Link to code

Link to code: https://charlesreid1.com:3000/cs/java/src/master/stacks-queues-deques/stacks/ArrayStack.java

Flags