Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
It's clever for code golf; I can't think of another way to do it with as few characters. And it's not something most people would think to do.
Production system? Of course not, but that's why the Clever tag was created.
The test cases for input are in there. Maybe you just missed it because you implemented it correctly the first time. I spent a very long time on the test cases, and a program that works with the "official" implementation might not work with this implementation as I covered some edge cases that weren't defined explicitly in the language's documentation.
Anyway, good catch that I didn't include unclean termination in the original description of when to throw an error. Will add that now.
Edit: and the other error test cases were mentioned in the previous description. I added the unclean termination test case.
I have removed the misleading statement from the problem statement. The question was initially meant to contain at least two points. More test cases were added later.
i also received this error message from one of the tests: "Any empty list of points trivially has all points in a line".
but the description of the kata states: "The input will contain at least two points containing valid integers."
IMO the solution is neither. It could be some sort of best practice if interpreted as 'simple to understand'.
At most the solution should be O(n log(n)).