← Questions

Fewest clicks between two wiki pages

0
SnowflakeCodingLast asked Sep 2026

Wiki pages link to other pages. Given a start page and a target page, return the fewest clicks needed to get from one to the other, or report that the target can't be reached. You only see links through a function that returns the outgoing links of a page, and you are asked to write a small simulator of that function too.

Follow-up: the link function can fail or time out. Make the search robust to that, and discuss retries and what answer you return when some pages could not be read.

Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding