This commit is contained in:
fwqaaq
2023-08-21 19:30:59 +08:00
committed by GitHub
parent 0134c6c13c
commit b751d1f24d

View File

@ -282,7 +282,7 @@ class Solution:
Rust:
use std::collections::VecDeque;
```rust
impl Solution {
const DIRECTIONS: [(i32, i32); 4] = [(0, 1), (1, 0), (-1, 0), (0, -1)];
pub fn num_islands(grid: Vec<Vec<char>>) -> i32 {
@ -312,8 +312,8 @@ impl Solution {
}
}
}
}
```
<p align="center">
<a href="https://programmercarl.com/other/kstar.html" target="_blank">