Skip to content

Commit 4c6e7eb

Browse files
authored
Update README.md
1 parent 802d08d commit 4c6e7eb

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff 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
```

0 commit comments

Comments
 (0)