mirror of
https://github.com/youngyangyang04/leetcode-master.git
synced 2025-07-09 19:44:45 +08:00
Update
This commit is contained in:
@ -282,7 +282,7 @@ class Solution:
|
|||||||
Rust:
|
Rust:
|
||||||
|
|
||||||
|
|
||||||
use std::collections::VecDeque;
|
```rust
|
||||||
impl Solution {
|
impl Solution {
|
||||||
const DIRECTIONS: [(i32, i32); 4] = [(0, 1), (1, 0), (-1, 0), (0, -1)];
|
const DIRECTIONS: [(i32, i32); 4] = [(0, 1), (1, 0), (-1, 0), (0, -1)];
|
||||||
pub fn num_islands(grid: Vec<Vec<char>>) -> i32 {
|
pub fn num_islands(grid: Vec<Vec<char>>) -> i32 {
|
||||||
@ -312,8 +312,8 @@ impl Solution {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
```
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://programmercarl.com/other/kstar.html" target="_blank">
|
<a href="https://programmercarl.com/other/kstar.html" target="_blank">
|
||||||
|
Reference in New Issue
Block a user