[rs] Add comment on simpler approach
This commit is contained in:
parent
93529c4173
commit
b9fad24df2
1 changed files with 4 additions and 0 deletions
|
|
@ -1,5 +1,9 @@
|
||||||
use std::collections::BinaryHeap;
|
use std::collections::BinaryHeap;
|
||||||
|
|
||||||
|
// This could've been implemented a lot simpler by
|
||||||
|
// 1. Using a HashMap<(i32, i32), usize> as a grid
|
||||||
|
// 2. Using a simple (round-based?) BFS instead of a Dijkstra
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
struct Grid<T> {
|
struct Grid<T> {
|
||||||
width: usize,
|
width: usize,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue