Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 26fc4c4

Browse files
authored
Update 0200.岛屿数量.广搜版.md
1 parent 0dc7f2f commit 26fc4c4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

‎problems/0200.岛屿数量.广搜版.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,9 @@ class Solution {
199199

200200

201201
### Python
202+
202203
BFS solution
204+
203205
```python
204206
class Solution:
205207
def __init__(self):
@@ -240,6 +242,7 @@ class Solution:
240242

241243
```
242244
### JavaScript
245+
243246
```javascript
244247
var numIslands = function (grid) {
245248
let dir = [[0, 1], [1, 0], [-1, 0], [0, -1]]; // 四个方向
@@ -324,7 +327,6 @@ function numIslands2(grid: string[][]): number {
324327
### Go
325328

326329
```go
327-
328330
var DIRECTIONS = [4][2]int{{-1, 0}, {0, -1}, {1, 0}, {0, 1}}
329331

330332
func numIslands(grid [][]byte) int {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /