Ad
  • Default User Avatar

    Same solution in C++ passes more tests (still fails) but I ran both and Python runs faster, hmm...

  • Default User Avatar

    I had to make an entirely new path finding algorithm. I got it to be O(n^2) and it's still not passing the tests. Absolutely ridiculous.

  • Default User Avatar

    Having the same issue...

  • Default User Avatar

    Bit late, I'm new to the platform. But basically what this solution is doing is iterating through the vector for every element in it and counting its occurrences, and returning it if the occurrence is odd. The reason why this solution "is terrible" is because it is an O(n^2) solution. Just because it takes one line of code to write doesn't mean it's efficient.