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.
Of course, if it were different problem, it'd require a different solution.
The only problem is if there is an odd number of repeated numbers then this won't work.
Use spoiler flag next time, please.
This comment is hidden because it contains spoiler information about the solution
Could anybody explain how this code works?
how its work lol
True, I've now fixed it https://www.codewars.com/kata/reviews/62e6303d76b7d300013ad079/groups/631a211057c60300017bcbf5
Invalidated.
How it works? if v = {1.0, 0.5, 1.0, 1.0, 1.0}, the answer should be 0.5 but it returns 1.0
Simple and great solution :)