Google Interview Question for SDE-3s
- 1of 1 vote
You have a plot with a limited amount of points on it.
Find the cluster of points, which contains the biggest amount of point grouped together.
The cluster means, that points are placed not farther than 5 units (Can be measured px, cm, etc.) between each other. The distance is calculated by where
|x1-x| < 5
|y1-y| < 5
The cluster should contain at least 3 points.- denis.zayats May 30, 2019 in United States
If there are a few clusters with the same amount of points - return all of them.
The points are:
(15,116), (1345, 123), (456, 11), (34, 17), (19, 112), (556, 111), (454, 15), (12, 120).
In this case, the best cluster is (15,116), (19, 112), (12, 120)
| Report Duplicate | Flag | PURGE
Google SDE-3 Algorithm
Interview Type: Written Test
Open Chat in New Window