Find the shortest path between two users in a friendship graph.
Unlock detailed company stats for this questionUpgrade
Given an adjacency list representing friendships between users, solve three parts. Part 1: find the shortest path between two users, returning the sequence of users traversed from user A to user B. Part 2: find the shortest distance between the two users. Part 3: suggest friends based on mutual connections between users.
Format · Technical interview.
Community answers
No answers contributed by the community yet.
Related questions
Find the shortest path in a graph.Find the shortest path between two nodes in an undirected, unweighted graph.Find the shortest cost path in a weighted graph.Related courses

Course

Course
Course
