Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/neetcode-gh/leetcode
/ top
Method
top
javascript/0155-min-stack.js:47–49 ·
view source on GitHub ↗
* @param {Array} * @return {number}
(stack = this.stack)
Source
from the content-addressed store, hash-verified
45
* @
return
{number}
46
*/
47
top(stack = this.stack) {
48
return
stack.length ? stack[stack.length - 1] /* Time O(1) */ : null;
49
}
50
51
/**
52
* @
return
{number}
Callers
2
push
Method · 0.95
getMin
Method · 0.95
Calls
no outgoing calls
Tested by
no test coverage detected