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.
Ok I get it now, thanks for the heads up
There are currently no basic tests in Ruby (consequence of an update), it has been pointed out in several issues.
I mean for example a code with only
return new List<int>(){2,3,4,5,6};
. You'll never get a message telling you there's more than one mismatch.Yeah sorry I did fixed the comment right after I posted it with the language I'm using at the top!
Not sure I understood what you mean, returning the same list where?
Please say which language you're using (I guess it's C#). Consider the tests will only return you the first element mismatched in case of a bad answer. Try returning always the same list and you'll see.
This comment is hidden because it contains spoiler information about the solution
Good morning to me! :D So I didn't realised about the parentheses on i+1, in that form it uses to pwr the i not the i+1. Solved thanks.
I think initially I had something like : tot + (Number(v) ** i+1) in the reduce method. I don't understand why this doesn't work. I'm pretty sure it's my bad anyway :P
Probably a problem with operators precedence, I just tried your code and it worked changing pow with **.
something was weird about the Exponentiation( ** ) while trying to solve this.
When I used math.Pow() my solution worked but when I used Exponentiation it gave me the same result over and over again. For example I used the expo( ** ) for power 1 and I got answer 2 no matter what number I had, like 5 ** 1 = 2, 6 ** 1 = 2. Then after a long time of trying to figure out, I just changed to math.Pow(5, 1) = 5 and there you go...
Was it something wrong I did? Or it just doesn't work to be used this way?
Ok thanks! Im quite new here and was the first question, I wasnt even sure what I wanted to ask!
I was using wrongly the function String.IndexOf, I was getting the same number if there were two equal digits and the Pow function I made was spitting out random numbers! I figured it out at the end, thanks anyway!
p.s. I forget everyone is using a different code! I'll keep that in mind
Depending on the language you can have some limitations, but I don't think it's the problem here. It's hard to help you without more informations! Ask a precise question (actually you don't even ask one!), say which language, which cases, etc. And maybe you may post your code (with a spoiler flag) if you cannot get out of it. Also,see if this may help: https://docs.codewars.com/training/troubleshooting.
my code works just fine with normal tests, but with random tests my final array only gets to 1306? looks like it cant workout higher numbers
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Loading more items...