One Exit Per Room
A game world has 200,000 rooms. Every room has exactly one exit, given by an array next[1..200000] where next[i] is the room you arrive in. For each of 50,000 queries you are given a starting room and asked where you land after exactly steps.
Which statement about this graph is guaranteed, and what does it buy you?
Sign in to answer questions and track your progress
Sign In