MCPcopy 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

spiralOrderFunction · 0.70
canMoveFunction · 0.70

Calls 1

getCellFunction · 0.85

Tested by

no test coverage detected