Skip to main content

Path reconstruction · 5 minutes

Recover a route from breadcrumbs

Get feedback on your answer. No account needed.

What does this Python code print?

parent = {"Gate": None, "Cafe": "Gate", "Lab": "Cafe"}
at = "Lab"
route = []
while at is not None:
    route.append(at)
    at = parent[at]
print(">".join(reversed(route)))

Enter the output on one line.

Your answer
Need a small hint?

The walk through parents starts at the destination.

This helps us choose when to schedule your next review.