From charlesreid1

(Created page with "==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 th...")
 
No edit summary
Line 7: Line 7:
* pop() - remove the top item in the stack and return it
* pop() - remove the top item in the stack and return it
* peek() - return reference to top item in stack, but do not remove it
* peek() - return reference to top item in stack, but do not remove it
==Link to code==
Link to code: see git.charlesreid1.com
==Source Code==
<pre>
your code here
</pre>
==Flags==
[[Category:Java]]
[[Category:Stack]]
{{DataStructuresFlag}}

Revision as of 07:33, 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: see git.charlesreid1.com

Source Code

your code here

Flags