So this is the problem, and my code is here. After a quick look at this, it’s obvious that the code is O(N^2), which should fail.
The thing is, it still gets accepted as a valid solution. Is this intended, or was the test data just not good enough?
So this is the problem, and my code is here. After a quick look at this, it’s obvious that the code is O(N^2), which should fail.
The thing is, it still gets accepted as a valid solution. Is this intended, or was the test data just not good enough?
I assume it’s not … maybe try downloading the test data and compare the running times locally against some custom test cases.