DA
EN
01
02
03
04
05
06
fn
solve
(
g
: Graph) -> Path {
let
frontier
= Heap::new();
while let
Some(n) = frontier.pop() {
if
n.
is_goal
() {
return
n.path; }
frontier
.
extend
(n.
expand
());
}
}
01
02
03