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.
O(n) since it involves finding the element twise, and also approach modifying the array.
Seeing your solution: Simple is not easy. Chapeau!
So there should be an algorithm to take off the solutions that don't pass new tests, no ?
If not, it's misleading to read solutions not working anymore.
Yes they were.
This solution doesnt work because it fails for
negative numbers : 1.2.3.-7
And also for strings with more than 4 groups of number with anything other than numbers as: 1.2.3.4.z
How has this solution passed the kata ?
Maybe the tests were different at the time ?
Ok now i know how stupid i am
but he wouldn't have passed the tests if there had been a flow, right?
If you add some invalid data after dot like '1.2.3.4.asdf' the total amount of valid numbers would be 4 and function will return 'true'
i wonder why you know this trick, i feel there are many weird terms of math linear
great solution
It's so cool to use 'v==Number(v).toString()'. But to filter out non-numbers and negative numbers is necessary.
How does this solution filters negative numbers?
beautiful. well done!