Ad
  • Custom User Avatar

    i dont understand your point, in this case if the algorithm isnt timed out and works, its worthly, not em real scenarios like big data, but if the person can do this algorithm like O(n^2) or even o(n^3), once thsi get an solution with some improvements and searchs, the person could make the algoritm O(n) or maybe (nlogn)(in this case i dont know if its possible).

  • Default User Avatar

    You could argue that it's useful to know that's a thing.

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    I was using a global variable to track the ships found and not resetting it at the start of my code. Lesson learned, run multiple tests in my IDE, not one at a time.