Anyone got 100 points in the "Collinear points" task?
I have only 98.19, because my Fast solution can't pass Test 8:
Assumes compareTo() or compare() returns -1, +1, or 0.
Test system wrote:
- student solution has 0 non-null entries
- reference solution has 4 non-null entries
But my application succefully finds collinear points in the equidistant.txt (I got this test file from zip-archive, which you can find into FAQ for this assignment).
So, on my laptop I have 4 entries, but not zero.
I can suppose only that my solution prints sets of points in other order. And I'm not talking about inner order in each set (lexicographically sort). For example, first set, which my solution prints:
(10000, 0) -> (8000, 2000) -> (2000, 8000) -> (0, 10000)
Line from assignment result:
- 4 missing entries in student solution, including: (30000, 0) -> (20000, 10000) -> (10000, 20000) -> (0, 30000)
I have this set of points. But it isn't first in the list.
I don't know how to change order of sets.
What I'm doing wrong? Anybody has ideas?