(current: int | None, parents: dict[int, int | None])
| 39 | |
| 40 | |
| 41 | def construct_path(current: int | None, parents: dict[int, int | None]) -> list[int]: |
| 42 | path: list[int] = [] |
| 43 | while current is not None: |
| 44 | path.append(current) |
| 45 | current = parents[current] |
| 46 | return path |
| 47 | |
| 48 | |
| 49 | def bidirectional_search( |
no test coverage detected