Ad
  • Custom User Avatar
        @Test
        public void testClosestLess() {
            int[][] points = {{1,2}};
            int[][] results = ClosestPoints.getTopN(points,3);
            assertEquals(results.length, 1);
        }
    

    The expected:<3> but was:<1> error message is not informative at all.

  • Custom User Avatar

    How should cases where the amount of points wanted is more than the given? Just giving empty coords ({0,0}) doesn't work and this is not indicated in the description.