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
Are you using floating point division?
Thank you for the quick fix. Issue resolved.
In PHP random tests:
Error: Call to undefined function oneResult()
Please look into this.
Can someone explain me why range(0, len(head), -1) doesn't work? It simply doesn't get in the loop...
len(head) is always > 0.
Maybe you want to try range(len(head), 0 , -1) ?
Thank you. Issue resolved now.
Clojure kata fails on this testcase:
n = 3 | we = [5 5 3 2 1 3 6] | st = "Avery,Olivai,Sophia,Michael,Elizabeth,Willaim,Liam,AsToR"
st contains 8 names, but we is of length 7.
Please look into this.
You're corerct. That is indeed redundant.
I've being using array.reduce(:+) in the past, which would return 'nil'.
Carried over that practice with array.sum as well.
This comment is hidden because it contains spoiler information about the solution
I'm not looping over each array element.
Instead, I'm looping over a range from 0 -> array size.
(0...arr.size).each is the same as for (int=0; i<arr.size(); i++) in C++
IMHO, the loop you're thinking of is: arr.each.with_index {|elem, i| ...}
Thanks. Great minds and all that :-)
Though, to be honest, for this one, my ruby solution is a straight translattion from my python solution.
Thank you. It works fine now.
For PHP, basic tests, but random tests fail.
Random test #29 : radius = 22, sides = 9
Failed asserting that 1399.991 matches expected 1.0.
Could you please look into it?
I'm seeing a similar issue with failures related to order of array elements as well
Did you account for the case of empty input?
-->> 2. if the given string is "" you will return "" <<--
Loading more items...