Skip to content
playdsa
Preferences

Make yourself comfortable.

Saved on this browser. Your device’s reduced-motion preference is always respected.

Theme
Advanced settings

The Vanishing Link

Learn
Play
Prove
Problem context and objectives
Mission briefing

Portal network mechanic · Travel portals are connected as a one-way chain

Repair the links without losing the unexplored route: The Vanishing Link.

Overwrite one next pointer too early and the rest of the expedition becomes unreachable.

How you win

  1. 1Recognize when Predecessor rewiring matches the clues
  2. 2Keep this true after every move: lead remains n links ahead of the predecessor pointer
  3. 3Reach the result within O(n)

Rules and pressure

  • Target cost: O(n)
  • State rule: lead remains n links ahead of the predecessor pointer
Lesson 1 of 3

Send lead n + 1 links ahead from dummy. Then march both pointers together; when lead reaches null, the follower is immediately before the target.

Your call · When removing the second node from the end of [1,2,3,4,5], where does predecessor stop?

Help shape PlayDSA

Something confusing, broken, or missing? Leave a quick note without leaving your lesson.

Please leave out passwords, payment details and other private information.

Page included: /

Sign in to save feedback here, or send it with your email app. Your draft stays here while you sign in.

Open email instead