O(n log n)
Just before close of play this evening, I managed to get the bit of code I've been working on to a state where I could test it on the problem sent to me by my Moscow correspondent. It's one of the few theoretically inefficient parts of the solver, but normally it doesn't matter. However, with the optimal algorithm I speed up the solver from 785 seconds to 0.79 seconds on his problem. This illustrates the difference between O(n^2) and O(n log n) when n is large.
Otherwise, it was a dull evening's walk in the Estate. With foul weather forecast for tomorrow and the weekend, the Scottish summer is over!
Comments
Sign in or get an account to comment.