Reiteration is prevented by skipping to 2 indexes down if a match is found. I’m not clear on how 0.5 will help here since we are looking at full pairs values
Yes, you're right. I somehow didn't notice you were using i++ and i+=1.
The 0.5 comment was regarding Bavesh's step 4, sorry I was not clear.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.