Ad
  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    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..

  • Default User Avatar

    it also gives true for 0,0,2

  • Default User Avatar

    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.

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    I've just done it.

  • Default User Avatar

    I'd like to state that this was not trivial and I was very close to give up.

  • Default User Avatar

    sorry, my mistake. At least my code worked..

    PS.: 1084 was not a leap year ;-)

  • Default User Avatar

    I can confirm i was stupid.

  • Default User Avatar

    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}

  • Default User Avatar

    PS: i used j instead of i..

  • Default User Avatar

    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

    1. d
    2. de
    3. deb
    4. dec
    5. deg
    6. def
    7. deh
    8. dea
    9. dej
    10. dg
    11. dgf
    12. dgb
    13. dge
    14. dgh
    15. dh
    16. dhj
    17. dhg
    18. dhe
    19. dhc
    20. dha
    21. dhf
    22. dj
    23. djh
    24. djf
    25. djb
    26. dje
    27. da
    28. dab
    29. dae
    30. daf
    31. dah
    32. db
    33. dbc
    34. dbe
    35. dbf
    36. dbg
    37. dbj
    38. dba
    39. dc
    40. dcb
    41. dce
    42. dcf
    43. dch
  • Default User Avatar

    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.

  • Default User Avatar

    it's any consequtives numbers...
    I guess you have assumed the first number always 1.
    e.g, 69 = 34+35