Ad
  • 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.

  • Default User Avatar

    Saying what's the issue with this solution would be much more helpful than just saying "is terrible"