Google Phone Screen | Jul 2024

google logo
google
Ongoing
July 19, 20242 reads

Summary

I recently had a phone screen interview with Google in July 2024. The main focus was a challenging coding question that required grouping objects based on shared properties.

Full Experience

My Google phone screen in July 2024 involved a single technical question. The problem presented an array of objects, each with a unique ID and several properties (p1, p2, p3). The task was to group these objects such that any two objects sharing at least one common property would belong to the same group. I was given an example demonstrating the input and the expected output structure. I discussed my approach, which involved identifying connections between objects through their properties.

Interview Questions (1)

Q1
Group Objects by Common Properties
Data Structures & AlgorithmsMedium

Given an array of objects, group them into a single group if they have any property in common.

Object structure:
{ id, p1, p2, p3; }

p1, p2, p3 are properties and can be shared, while id will be unique for each object.

For Example:
Input :
E1 : id1, p1, p2, p3
E2 : id2, p1, p4, p5
E3 : id3, p6, p7, p8
E4 : id4, p9, p10, p5

Output :
{{id1, id2, id4}, {id3}}

Discussion (0)

Share your thoughts and ask questions

Join the Discussion

Sign in with Google to share your thoughts and ask questions

No comments yet

Be the first to share your thoughts and start the discussion!