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.
A best practice when templating this kind of algorithm is to
make it generic, i.e. pass a range or [begin,end) as template parameters...
Indeed, the initial parameter says 'iterable' :-)
May also test with any kind of ordered iterable, so that one may use concepts one day and return {} if the values cannot be ordered ?
s = 'AAAABBBCCDAABBB'
s = 'AAAABBBCCDAABBB1254888744'
s = ['AA', 'A', '', '','B','B','C','c','b', '', 'None',5,5,'5']
s = ['i', 't', 'e', 'r', 'a', 'b', 'l', 'e']
s = ['A', 'B', 'C', 'D', 'A', 'A', 'D']
s = ['A', 'A', None, None, None]
s = ['5', 5]
i run all above TCs in local env, and all producing the required result
but when i run here, it failed with the below error
expected undefined to deeply equal [ 'A', 'B', 'C', 'D', 'A', 'B' ]
This comment is hidden because it contains spoiler information about the solution
Thanks bro, finally it works for all 21 TCs. i completely missed that part to output the sum of all cubics.
Read the description again:
The second 0 is
sumOfCubicNumbers
You can easily see that in the example:
154 is not in the string, it's the sum of 0 + 1 + 153
where the second zero came from ?! we extracted
1 | 3
digits numbers, then sum of the cubic of each number digit0 737 244 125 863
like that :
153 is such a "cubic" number: 1 ^ 3 + 5 ^ 3 + 3 ^ 3 = 153
Read the post below, it's explained why the answer to that is
"0 0 Lucky"
One is the hidden cubic number, the second zero is the sum of all cubic numbers.the packets with at most 3 digits in this string
0 9026315 -827&()
is
0 902 631 5 827
Who agree with me ?Cal the cubic of each digit and sum up all
0 737 244 125 863
Then check sum only '0 Lucky'
i beleive something wrong with test case
please all help, it is nice kata but tooks me a while to figure it out :) .
the packets with at most 3 digits in this string
0 9026315 -827&()
is
0 902 631 5 827
Who agree with me ?Cal the cubic of each digit and sum up all
0 737 244 125 863
Then check sum only '0 Lucky'
i beleive something wrong with test case
please all help, it is nice kata but tooks me a while to figure it out :) .
This comment is hidden because it contains spoiler information about the solution
Do u mind to check out my solution , and how it passed the TCs ?!
Thanks
Just wanted to highlight that ,
i really like ur katas, am learnign new things everytime
keep rocking dude -;)
I'm very positive this would have been created WELL before that one?
This comment is hidden because it contains spoiler information about the solution
I got it resolve !!
Loading more items...