(grid, row, rows, col, cols, seen, minHeap)
| 34 | }; |
| 35 | |
| 36 | var checkNeighbors = (grid, row, rows, col, cols, seen, minHeap) => { |
| 37 | for (const [_row, _col] of getNeighbors(row, rows, col, cols)) { |
| 38 | if (seen.has(grid[_row][_col])) continue; |
| 39 | |
| 40 | minHeap.enqueue([_row, _col], grid[_row][_col]); |
| 41 | } |
| 42 | }; |
| 43 | |
| 44 | const getNeighbors = (row, rows, col, cols) => |
| 45 | [ |
no test coverage detected