I have to agree with dafuloth, the description is very difficult to understand and even after forfeiting to see the solution I don't understand the math behind.

Comment deleted because it might have upset someone

TLDR: Agreed with Smudge that no one should be fired just because they code in this way, but expressed agreement with the sentiment that I don't find it great for readability. YMMV. It was just my opinion.

Description said: to figure out how many meters the path length of squirrel climbed when it reached the tree top.
Note, the path length of squirrel climbed, S is the length of its circumference, not the path length of squirrel climbed in a loop.
Is this clear?

EDIT: You can flatten the tree like a paper, in your imagination. Then rethink this problem.

If circumference (a loop around the trunk of the tree), S=3, each loop climbs the tree h=4 and height of tree H=16, then my understanding is that it will take 4 loops to reach the top because 4x4=16. So total travelled is 4x3=12 but yet expected output is 20.

My solution fails the last of the three sample tests. If I ignore that and click Attempt, it passes all the final tests just fine. My solution does what was asked. My result array is correct. Seems the only reason it fails the third sample test is that the order of elements in my result array doesn't exactly match the order of elements in result array of the test.

Same problem with mine

I have to agree with dafuloth, the description is very difficult to understand and even after forfeiting to see the solution I don't understand the math behind.

Yeah, for a 6 kyu kata I was expecting something slightly more involved

Relax... note that I was disagreeing that anyone should be fired for writing code in this style.

If it's causing that much offense, I'm deleting my comment.

This comment is hidden because it contains spoiler information about the solution

Comment deleted because it might have upset someone

TLDR: Agreed with Smudge that no one should be fired just because they code in this way, but expressed agreement with the sentiment that I don't find it great for readability. YMMV. It was just my opinion.

Description said:

`to figure out how many meters the path length of squirrel climbed when it reached the tree top.`

Note,

`the path length of squirrel climbed`

, S is`the length of its circumference`

, not`the path length of squirrel climbed in a loop`

.Is this clear?

EDIT: You can flatten the tree like a paper, in your imagination. Then rethink this problem.

Then I truly do not understand the question.

If circumference (a loop around the trunk of the tree), S=3, each loop climbs the tree h=4 and height of tree H=16, then my understanding is that it will take 4 loops to reach the top because 4x4=16. So total travelled is 4x3=12 but yet expected output is 20.

The answer is: no

Sorry for late ;-)

First question... because I think I was not fully understanding the description...

Will I need to calculate that "constant angle to the ground"?

This comment is hidden because it contains spoiler information about the solution

My solution fails the last of the three sample tests. If I ignore that and click Attempt, it passes all the final tests just fine. My solution does what was asked. My result array is correct. Seems the only reason it fails the third sample test is that the order of elements in my result array doesn't exactly match the order of elements in result array of the test.

See for yourself.

Expected: ["aabb", "bbaa", "abab", "baba", "baab"], instead got: ["abab", "aabb", "baba", "baab", "bbaa"]

My solution is at https://www.codewars.com/kata/reviews/523b40a5ad90113c2b00000f/groups/5ba2843ea27840cf640025f6

See reduce/inject or even array#sum for more idiomatic ways of summing an array.

Note that the tests you fail have repeating letters where you don't respect the string length.

This comment is hidden because it contains spoiler information about the solution