re: Javascript Sock Merchant Challenge - Solution 1 VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Could we add 0.5 to avoid reiteration and round up when getting the value for a specific color?
 

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.
Sorry.

The 0.5 comment was regarding Bavesh's step 4, sorry I was not clear.

code of conduct - report abuse