Write a data type to represent a set of points in the unit square (all points have x- and y-coordinates between 0 and 1) using a 2d-tree to support efficient range search (find all of the points contained in a query rectangle) and nearest-neighbor search (find a closest point to a query point). 2d-trees have numerous applications, ranging from classifying astronomical objects to computer animation to speeding up neural networks to mining data to image retrieval.
Compilation: PASSED
API: PASSED
SpotBugs: PASSED
PMD: PASSED
Checkstyle: PASSED
Correctness: 35/35 tests passed
Memory: 16/16 tests passed
Timing: 42/42 tests passed
Aggregate score: 100.00%
[ Compilation: 5%, API: 5%, Style: 0%, Correctness: 60%, Timing: 10%, Memory: 20% ]