Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/neetcode-gh/leetcode
/ isInBounds
Function
isInBounds
javascript/0054-spiral-matrix.js:13–13 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
11
let
[top, bot, left, right] = [0, rows, 0, cols];
12
13
const
isInBounds = () => left <= right && top <= bot;
14
while
(isInBounds()) {
15
/* Time O(ROWS * COLS) */
16
addTop(
Callers
2
spiralOrder
Function · 0.70
canMove
Function · 0.70
Calls
1
getCell
Function · 0.85
Tested by
no test coverage detected