Skip to content

Commit

Permalink
idea for shortest path solution
Browse files Browse the repository at this point in the history
  • Loading branch information
byorgey committed Nov 24, 2023
1 parent 04d63db commit 7d66f5f
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Idea: keep a fringe of locations marked with some entity (say,
// flowers), such that at every step a location has a flower iff it is
// exactly n steps away. To expand it, do DFS (marking visited spots with rocks),
// and when finding flowers, mark adjacent empty spots with some third entity;
// then do a second pass to get rid of flowers; then a third pass to turn the
// third entity into flowers.

0 comments on commit 7d66f5f

Please sign in to comment.