InterviewDB Question

Blocker Distance Query: SQL to Find the Nearest Blocking Obstacle for Each Entity

Question Details

Problem You have a table of entities (e.g., robots) at positions on a 1D track, and a table of blockers (obstacles) also at positions. For each entity, find the nearest blocker that is directly ahead of it (i.e., at a strictly greater position), and…

Full Details

🔒

Unlock full leaked content

Full insider details, leaked discussions, and candidate experiences.

Get Premium →

Topics

Onsite Sql Phone Coding