File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,16 @@ My Stack Implementation In Java
44
55## MyStackJava Functions
66
7- -
7+ - ` public MyStack(int size) ` : Create a new stack with a given size
8+ - ` public boolean push(int value) ` : Push an element to the top of the stack and return true.
9+ - ` public int pop() ` : Pop an element from the top of the stack and return the value.
10+ - ` public int peek() ` : Peek the top value of the stack and return the value.
11+ - ` public boolean isEmpty() ` : Return true if the stack is empty.
12+ - ` public boolean isFull() ` : Return true if the stack is full.
13+ - ` public int size() ` : Return the size of the stack.
14+ - ` public boolean resize(int newSize) ` : Resize the stack to a new size.
15+ - ` public void printStack() ` : Print the stack.
16+
817## Using MyStackJava
918
1019```
You can’t perform that action at this time.
0 commit comments