Find shortest relationship path using BFS

Read the full interview experience this question came from →

Quick Overview

This question evaluates proficiency in graph representations and traversal algorithms—specifically BFS and adjacency-structure construction—for computing unweighted shortest paths and reasoning about reachability.

Find shortest relationship path using BFS

Company: Google

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: medium

Interview Round: Technical Screen

Overview: This question evaluates proficiency in graph representations and traversal algorithms—specifically BFS and adjacency-structure construction—for computing unweighted shortest paths and reasoning about reachability.

Read the full Google Software Engineer interview experience this question came from

|Home/Coding & Algorithms/Google
Google logo
Google
Feb 12, 2026
mediumSoftware EngineerTechnical ScreenCoding & Algorithms
24
0
Loading...

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...