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.
great
Please use spoiler flag next time.
looks like code written by someone who doesn't want to get hired or work in a team :)
Thank for the info, I didn't know that.
It's a limit on recursion, not a kata bug.
const isLeapYear = y => y % 16 ==0
this is also my solution but it fails lets say for the year 4 or 8 !!!
Yes it need to have test cases for this years too!
...
This comment is hidden because it contains spoiler information about the solution
@donaldsebleung
I took another look at this one today and was able to pass it in less than a second.
I believe the trick is that it's very slow to just keep concatenating strings over and over (since you're basically remaking the whole string every single time you do it), so you're going to want to look into some different, faster way to concatenate your strings.
@Souzooka I'm having the exact same problem right now; I deliberately commented out my loops to view the console output and that indeed appears to be the case - some of the numbers used were well above
5000
, let alone500
:(@GrahamD I suggest that you either edit the C# translation to make the tests a bit more lenient or explicitly state in the Description that there will be performance testing in the C# version - after all, this Kata appears to be aimed at beginners so the average solver would not expect the tests to be so harsh.
@Souzooka, BTW is there any chance that you might have completed this Kata in C# since writing this comment and if so, may you please drop me a hint? ;)
If a pair of input like this
(1,3)
, should print*
*
*
a lot of the solutions won't print it, including mine, instead, will print
*
**
*
hence the solution it might not be taking care of all the possible cases
Have I misunderstood the problem and what I am trying to point out here is futile or it should be in the random tests, inputs like
(1,h>2)?
Thanks
This comment is hidden because it contains spoiler information about the solution
I concur, you can brute-force it (although I don't know if there would be a more efficient way to just skip numbers, except just checking if they were even or something, but that's all I can really think of) by checking every number, as long as you know how to check if a number is prime efficiently.
Not really a hard Kata.
Is it? I don't think it's that hard as a 6kyu. You just need to think of how many number to test a bit carefully.
Katas like this would be the ones that truly should be up-ranked to 6kyu.
Did you mutate the input array in place instead of returning a new, wave-sorted array?
That's the requirement if you look at the test cases.
Loading more items...