Google · Onsite
In processGoogle MLE PhD New Grad VO: Streaming Items Within Distance D
Role: Machine Learning Engineer, PhD New Grad
Result: Final outcome not disclosed
Report time: March 2025
Coding and design prompt
Integers arrive one at a time on a conveyor belt. An unlimited waiting area stores items until a valid group can be packed and removed.
The report says items should be packed in groups of k, while also saying the function returns three numbers. The farthest pairwise distance in a group must be at most d.
Example for d = 3 and k = 3:
[2,4,5]is valid because5 - 2 = 3.[1,4,5]is described as invalid, even though5 - 1 = 4clearly exceeds3.
When a valid group exists, output its values and remove them from the waiting area. Otherwise, emit nothing for that arrival.
Contract conflict
A related FastPrep exercise uses exactly three items and a strict distance threshold, while this source parameterizes k and treats equality with d as valid. The author did not clarify whether k is always three or how ties and group choice work.
Because those details change judged outputs, no practice link is asserted rather than forcing this report into the related but different triplet contract.
Comments
0No comments yet — be the first to share what you know.