Ola-inspired location-clustering service must identify dense groups of nearby pickup points while treating sparse points differently. You need to determine whether each point is a DBSCAN core point under the supplied radius and minimum-neighbor rules.
For every point, decide whether it is a DBSCAN core point: it is one if at least min_samples points (itself included) lie within Euclidean distance eps of it, boundary included.
Implement solve(X,eps,min_samples).
Returns. Return a boolean NumPy array with one entry per point.
Example 1
Input:
solve([[0, 0], [0, 1], [5, 5]], 1.1, 2)
Output:
[True, True, False]
Example 2
Input:
solve([[0.0], [1.0], [2.0], [3.0]], 1.0, 3)
Output:
[False, True, True, False]
No results yet
Run your code to check it against the examples, or submit to run every test.