(a, b)
| 29 | } |
| 30 | |
| 31 | function findPath_list(a, b) { |
| 32 | let work = [{at: a, via: null}]; |
| 33 | let reached = new Set([a]); |
| 34 | for (let path of work) { |
| 35 | if (path.at == b) return pathToArray(path); |
| 36 | for (let next of path.at.edges) { |
| 37 | if (!reached.has(next)) { |
| 38 | reached.add(next); |
| 39 | work.push({at: next, via: path}); |
| 40 | } |
| 41 | } |
| 42 | } |
| 43 | } |
| 44 | |
| 45 | time(findPath_list); |
nothing calls this directly
no test coverage detected