← Amazon questions

Check if connection request can be sent within k degrees of separation

Filed under Amazon

Given an undirected graph of users and their connections, determine if user A can send a request to user B, which is allowed only if the shortest path distance between them is at most k.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Amazon questions

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