Yes array is only populated with color integer and the challenge is specific about actual pairs so no possible. [1,1,1] should return 1 to satisfy the exercise requirements
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I had the same idea as Bhavesh but looking at the code in the article (I could not watch the video so sorry if it's in there), I'm a little confused.
Is arr populated with only the color integer? Like [1,2,1,1,3] for example?
Also, if you have something like [1,1,1], does the function need to return 1 or 2?
1 pair and 1 lonely sock?
Or 2 possible pairs?
Yes array is only populated with color integer and the challenge is specific about actual pairs so no possible. [1,1,1] should return 1 to satisfy the exercise requirements