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.
Such minor details do not really affect the algorithm used to solve the kata. So not using
0
, or similar restrictions, do not make your kata not a duplicate.Just noticed, that in your Kata digits can be in the number multiple times. Also, there are a few differences between your and my Kata.
But I will leave it unpublished for now.
Sure.
Sorry 'bout that. Maybe you could translate that to Dart? You might have to forfeit an existing language, but I think you can translate it when you've done that.
Thanks! I will close it.
Duplicate
Same for me ^^
All the tests can be easily hardcoded.
That is true. You could simply hard-code the outputs. But that is not the point of this kata.
If you want to cheat, you could simply do that, but then you are simply fooling yourself, aren't you?
n could theoretically be 36, but that would simply need too much time to calculate.
How high can
n
be? The outputs can be hardcoded easily for2 <= n <= 36
(and even higher if one's willing to waste their time) - if that is the case, you should unpublish the kata, tbh.So I think you are incorrect in how you are generating the numbers.
Given y = (x * 2 +1 ), you aren't looking to plug n in there, as x is what is in u.
This sentence might help clear up the issue "1 gives 3 and 4, then 3 gives 7 and 10, 4 gives 9 and 13, then 7 gives 15 and 22 and so on..."
So you start with 1, y will equal 1 * 2 + 1 = 3, z =4. So now it looks like [1,3,4] The next step is moving to the next item in the sequence. So you do the same y = 3 * 2 + 1 = 7 and z = 10 and so on.
So you aren't plugging into the y or z formula but are using the numbers in the sequence.
Timing out is not a kata issue. Your code is too slow.
Not so many, but it seems some people passed the random tests in Dart too. And yes, all test should pass in less than 12 seconds.
This comment is hidden because it contains spoiler information about the solution