Well, now I was actually thinking: "I can get the time consumption down to O(N) if I draw a line that passes close enough to all the points, without optimizing it at all". I donät think that can be done if I make an actual fit...
The cost-benefit analysis here depends, obviously, on my...