Skip to content

Commit 8904022

Browse files
Array Implementation for Stack
1 parent 6cbd0ef commit 8904022

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/stack/implementation/Array.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public int peek() {
8383
* <p><b>Complexity:</b> O(1) time and O(1) space.
8484
*
8585
* @return {@code true} if and only if this stack contains no items;
86-
* {@code false} otherwise.
86+
* {@code false} otherwise.
8787
*/
8888
public boolean isEmpty() {
8989
return top == -1;
@@ -95,7 +95,7 @@ public boolean isEmpty() {
9595
* <p><b>Complexity:</b> O(1) time and O(1) space.
9696
*
9797
* @return {@code true} if the stack has reached its maximum capacity;
98-
* {@code false} otherwise.
98+
* {@code false} otherwise.
9999
*/
100100
public boolean isFull() {
101101
return top == arr.length - 1;

0 commit comments

Comments
 (0)