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.
This comment is hidden because it contains spoiler information about the solution
That is beauty of algorithms. Everytime you do loop you add n time to your execute time. if you make loop in loop it is n^2 time and so on. You need to find better way to make this program a little bit faster.
All my code versions passed the test cases.
but they all seem to time out, Dont understand this kata.
Ruby translation
Fixed.
Mistake in the question.
for the input [5, 10] return 8 (5, 7, 9 have strongness 0; 6, 10 have strongness 1; 8 has strongness 2)
8 has strongness 3 i guess because 8 / 2 = 4
4 / 2 = 2
2 / 2 = 1
So the strongness should be 3.