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
This comment is hidden because it contains spoiler information about the solution
Kata clearly says inputs are not empty, but there are empty input test cases.
Also, the desciption is not alligned with the test cases... I see solution that give back true for 0,0,2 are accepted..
it also gives true for 0,0,2
with the {} he defines an object actually, here the 1,2,3,4 will be actually a key.
since the length of the users can be more than 4, he has ot ensure that he is mapping to 4, even even the lenght is 5 or 1000.
for example
console.log( {'key1' : 'value' , 'key2':'value2' 3 : 'value3'} ['key2'] }
and [3] or ['key2'] work as well.
This comment is hidden because it contains spoiler information about the solution
I've just done it.
I'd like to state that this was not trivial and I was very close to give up.
sorry, my mistake. At least my code worked..
PS.: 1084 was not a leap year ;-)
I can confirm i was stupid.
I did this Kata in 1 line, but not sure if this make sense...
Like in 1084, there were 52 weeks and every days were 52 times.
So, the answer should be 7 days, not only the 1st Jan and 31th Dec.
Am i missing something?
1084
Jan 1:TUESDAY
Dec 31:WEDNESDAY
{THURSDAY=52, MONDAY=52, SUNDAY=52, TUESDAY=53, WEDNESDAY=52, SATURDAY=52, FRIDAY=52}
PS: i used j instead of i..
It's strange that e,4 works for me with 256, but I can't pass 37 for D,3.
It's also weird if you have more then 1 length, the 1 letter is count count.
START:D max:3
This is a bit stupid, I've change back to Java8, so that way I don't get the time out. At least not always.
I am quite sure the solutions runtime are quite different on each platform.
Also, the same code passes 3 out of 5 times. There are many ways I can further optimize the code, but that are some trade of.
And speed optimazition was not the initial goal of this kata, at least that was not market.
it's any consequtives numbers...
I guess you have assumed the first number always 1.
e.g, 69 = 34+35