Google L4 phone interview

Difficulty: MEDIUMCategory: InterviewExperienceFrequency: 1Asked On 2024-12-23Added By Anonymous
Source: Link

Company: Google
Role: L4
Interview Stage: Phone Screen
Location: unknown
Year: unknown

Original Post Content:

You are given undirected and unweighted graph of uppercase nodes. Alice is at A and Bob is at B. Both need to reach at D.
Both can go in same car from common edge.
Compute the min distinct edges required for Bob and Alice to reach D.

(F is connected to D)

A -- F
| \\
C -- E --D
|
B -- G -- H

Ans: 4
A-C-E-D
B-C-E-D

Comments