← CodeNation questions
CodingReported in a candidate post, Apr 2022

Closest Node to W on Path Between U and V

Filed under CodeNation

The question

Given a tree and multiple queries each specifying nodes U, V, and W, find the closest node to W lying on the path between U and V.

No write-up yet. Related questions below have one.

Related CodeNation questions

Collected from public candidate posts and coding forums. Updated Nov 2026.