Google L5 Interview | January 2025
Anonymous User
2743
Mar 11, 2025

Hi Everyone,

I appeared for Google L5 interview in January 2025. Here are the questions I was asked. Hope this will help people preparing for the same role.

Round 1:

You are given a list of worker shifts, where each shift is
represented as a list [name, start, end]. The name is a string
representing the worker's name, start is an integer representing the
start time of the shift, and end is an integer representing the end
time of the shift. The goal is to generate a schedule that shows the
intervals of time and the workers present during each interval.

Example:
Given the input:
[["Abby", 10, 100], ["Ben", 50, 70], ["Carla", 60, 70], 
["David", 120, 300]]

The output should be:
[[10, 50, ["Abby"]], [50, 60, ["Abby", "Ben"]], 
[60, 70, ["Abby", "Ben", "Carla"]], [70, 100, ["Abby"]], 
[120, 300, ["David"]]]

Round 2:

Given an undirected acyclic connected graph where each node has
at most 3 edges, find a node which, when made the root, converts
the graph into a binary tree.

Follow-up: 
The nodes are colored Black or White, find a root such that:
• The graph becomes a binary tree.
• The tree alternates in color across layers (e.g., Depth 0: White,
Depth 1: Black, Depth 2: White, etc.).
Either White or Black can be the starting color.

Follow-up:
The nodes are colored Red (R), Blue (B), or White (W), find a
root such that:
• The graph becomes a binary tree.
• The layers of the tree follow a fixed color sequence 
e.g., RBWRBW… or BWRBWR… or WRBWRB).

Round 3:
The third round question was Range Module

The query part was a single value instead of the range.

Follow-up: The query part was now a range.

Hope this helps.

Comments (8)