mirror of
https://github.com/youngyangyang04/leetcode-master.git
synced 2025-07-09 03:34:02 +08:00
Update
This commit is contained in:
@ -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">
|
||||
|
Reference in New Issue
Block a user