Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/apna-college/Alpha
/ pop
Method
pop
13_Stacks/StackLL.java:30–37 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
28
}
29
30
public
static
int
pop() {
31
if
(isEmpty()) {
32
return
-1;
33
}
34
Node top = head;
35
head = head.next;
36
return
top.data;
37
}
38
39
public
static
int
peek() {
40
if
(isEmpty()) {
Callers
15
main
Method · 0.95
main
Method · 0.95
stockSpan
Method · 0.95
main
Method · 0.95
isValid
Method · 0.95
checkDuplicate
Method · 0.95
main
Method · 0.95
main
Method · 0.95
isValid
Method · 0.95
isDuplicate
Method · 0.95
maxArea
Method · 0.95
maxArea
Method · 0.95
Calls
1
isEmpty
Method · 0.95
Tested by
no test coverage detected