mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2026-03-13 15:21:15 +08:00
Remove live code & console.log, leave examples as comments (Geometry, Graphs, Maths).
This commit is contained in:
@@ -46,12 +46,6 @@ Pseudocode:
|
||||
|
||||
Return the count
|
||||
*/
|
||||
const grid = [
|
||||
['1', '1', '0', '0', '0'],
|
||||
['1', '1', '0', '0', '0'],
|
||||
['0', '0', '1', '0', '0'],
|
||||
['0', '0', '0', '1', '1']
|
||||
]
|
||||
|
||||
const islands = (matrixGrid) => {
|
||||
const matrix = matrixGrid
|
||||
@@ -83,4 +77,12 @@ const islands = (matrixGrid) => {
|
||||
}
|
||||
return counter
|
||||
}
|
||||
console.log(islands(grid))
|
||||
|
||||
export { islands }
|
||||
|
||||
// islands(
|
||||
// ['1', '1', '0', '0', '0'],
|
||||
// ['1', '1', '0', '0', '0'],
|
||||
// ['0', '0', '1', '0', '0'],
|
||||
// ['0', '0', '0', '1', '1']
|
||||
// )
|
||||
|
||||
Reference in New Issue
Block a user