Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
So, this is not the best practice even though it has 68 best practices. This mean I should not just beleive this counter, I think.
I have just joined codewars and want to understand it.
Yes, and while doing this it builds three potentially unnecessary intermediate strings.
Tell me please, does this solution iterate over formData four times?
invalidated ;-)
fixed for JS
fixed in JS
Big part of the answers are incorrect. [[0,1],[0,3],[1,2],[1,2]] this type of array will breake their code. So you can not just calculate sum of left and right shoes. You need to check every of pair (sort or something like this). And you can not make the array unique
If I am not wrong, solution like this will not pass test on JS like
Test.assertEquals(pairOfShoes([[0,20],[0,21],[1,19],[1,22]]), false)
with equal sum of sizes for left and right shoes.
What if shoes = [ [0, 2], [0, 10], [1, 5], [1, 7] ] ?