FastPrepRouter Reachability Within Manhattan Range
Problems/Router Reachability Within Manhattan Range

Router Reachability Within Manhattan Range

Google logoGoogle● MediumNEW GRADONSITE INTERVIEW

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: The report gives the exact router coordinates, R=10, Manhattan distance, and asks whether you can reach the end from the start. We publish the full base task. The unanswered nearest-first follow-up stays separate. Our version is about 95% the same as the reported question.

Each router is a point [x,y]. Two routers can communicate directly when their Manhattan distance is at most range.

Given start and end router indices, return whether data can be relayed from start to end through any sequence of direct links.

All links are bidirectional. A router can always reach itself.

Function

canRoute(routers: int[][], range: int, start: int, end: int) → boolean

Examples

Example 1

routers = [[0,0],[0,8],[10,8],[0,28]]range = 10start = 0end = 2return = true

Router 0 reaches 1, and router 1 reaches 2.

Example 2

routers = [[0,0],[20,0]]range = 10start = 0end = 1return = false

The only pair is outside range.

Example 3

routers = [[5,5]]range = 0start = 0end = 0return = true

A router reaches itself without a link.

Constraints

  • 1 <= routers.length <= 2000.
  • Each router contains two coordinates in [-10^9,10^9].
  • 0 <= range <= 2*10^9.
  • Start and end are valid indices.

More Google Onsite Interview questions

  • Route Pattern MatcherPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Evaluate a Nested Math ExpressionPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Distinct Subset SumsONSITE INTERVIEW · Seen Nov 2026
  • Playlist With No Same Artist in a RowONSITE INTERVIEW · Seen Nov 2026
  • Delete Nodes and Return Forest RootsONSITE INTERVIEW · Seen Nov 2026
  • Dice-Walk Winning ProbabilityPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • First and Last Target Position in a Mountain ArrayONSITE INTERVIEW · Seen Nov 2026
  • Lowest Common Ancestor in an N-ary TreePHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • 0/1 Knapsack with Weight and Volume LimitsONSITE INTERVIEW · Seen Nov 2026
  • Batched Subsequence Word MatchesONSITE INTERVIEW · Seen Nov 2026

Similar questions at other companies

  • Detonate Bombs with Chain ReactionsAirbnb · PHONE SCREENAirbnb interview questions
  • Course ScheduleAmazon · PHONE SCREEN · ONSITE INTERVIEW
  • Course ScheduleOracle · ONSITE INTERVIEWOracle interview questions
  • Course SchedulePlaud · ONSITE INTERVIEW
  • Explore an Unknown Grid and Find a PathLinkedIn · ONSITE INTERVIEWLinkedIn interview questions
  • Nearest Charging Station on a GridSpotify · ONSITE INTERVIEW
  • Hierarchical Permission CheckeBay · ONSITE INTERVIEWeBay interview questions
  • Evaluate DivisionPhonePe · ONSITE INTERVIEWPhonePe interview questions
  • Count Friend CirclesOpenAI · PHONE SCREEN · ONSITE INTERVIEWOpenAI interview questions
  • Radar Barrier CrossingSnap Inc. · ONSITE INTERVIEWSnap Inc. interview questions

Google interview experiences

  • Google interviews · November 2026
  • Google Software Engineer Onsite Questions: 10 Experiences
  • Google OA: What It Tests (2026)
  • Google L4 SWE Phone Screen: 1 Experience
  • Google ML Engineering Manager Onsite: 1 Experience
  • Google Experienced SWE First Round and Onsite: 1 Experience
All Google interview questionsSee Google hiring insights
Saved
class Solution {
    public boolean canRoute(int[][] routers, int range, int start, int end) {
        // Write your code here.
    }
}
Checking account…