Ad
  • Custom User Avatar
  • Custom User Avatar

    This is so clean. Please consider to add comments I really would like to understand how it works and the logic behind.

  • Custom User Avatar

    Description says that ···· · −·−− ·−−− ··− −·· · is HEY JUDE but as seen in the previous kata, there should be 3 spaces between Y and J, am I right?

  • Custom User Avatar

    There are no tests where wrong-shaped extra ships are placed surrounded by water.
    I know this because in those cases my code would fail (returning true instead of false), but it doesn't because there are no tests like that.
    An example:

    {{1, 0, 0, 0, 0, 1, 1, 0, 0, 0},
    {1, 0, 1, 0, 0, 0, 0, 0, 1, 0},
    {1, 0, 1, 0, 1, 1, 1, 0, 1, 0},
    {1, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 1, 0},
    {0, 0, 0, 0, 1, 1, 1, 0, 0, 0},
    {1, 1, 0, 0, 0, 0, 0, 0, 1, 0},
    {0, 1, 0, 1, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 1, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}

    My code checks everithing but those cases, and passes all tests. Please fix that.

  • Custom User Avatar

    Ok, i thought there were only 0s and 1s because of the simplicity of checking if 1+1+1 % 3 = 0

  • Custom User Avatar

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

  • Custom User Avatar

    Don't start with an example. Explanation is not very useful.

  • Custom User Avatar
  • Custom User Avatar

    I meant HE is right, I think it should not be difference between an empty List and a Array.toList() as the function is expected to return a List

  • Custom User Avatar

    I would suggest to add upper case examples to avoid confusion.

  • Custom User Avatar

    You are right, it is a Type bug with empty arrays. I do this workaround: if result.length == 0 return Arrays.asList()

  • Custom User Avatar

    Input: As shown above.
    Errors for both examples:

    Incorrect match: wcG, tTyTYHCkoq, zgkNeZQ
    Incorrect match: dlGh

  • Custom User Avatar

    I think random tests are not working on Java 11 as I mannually checked results and seem to be fine. Some examples:

    uxUKZjc,YoJVIJto:xWoulrbb YoJVIJto cRn;cRn/tTyTYHCkoq cRn tTyTYHCkoq/tTyTYHCkoq xWoulrbb_wcG cRn uxUKZjc xWoulrbb-tTyTYHCkoq wcG:cRn xWoulrbb_wcG tTyTYHCkoq:wcG.tTyTYHCkoq-uxUKZjc wcG cRn zgkNeZQ wcG tTyTYHCkoq;wcG uxUKZjc:uxUKZjc:xWoulrbb/uxUKZjc.tTyTYHCkoq!tTyTYHCkoq xWoulrbb tTyTYHCkoq?uxUKZjc xWoulrbb.cRn/tTyTYHCkoq-wcG zgkNeZQ;YoJVIJto wcG uxUKZjc/YoJVIJto tTyTYHCkoq wcG.zgkNeZQ YoJVIJto cRn/zgkNeZQ uxUKZjc/tTyTYHCkoq-cRn-wcG zgkNeZQ uxUKZjc zgkNeZQ_zgkNeZQ uxUKZjc_wcG!tTyTYHCkoq?xWoulrbb/xWoulrbb zgkNeZQ wcG!zgkNeZQ/uxUKZjc cRn cRn uxUKZjc xWoulrbb xWoulrbb_zgkNeZQ wcG/zgkNeZQ,YoJVIJto!YoJVIJto?zgkNeZQ,uxUKZjc zgkNeZQ xWoulrbb tTyTYHCkoq wcG xWoulrbb YoJVIJto!uxUKZjc tTyTYHCkoq!zgkNeZQ zgkNeZQ uxUKZjc!zgkNeZQ wcG wcG tTyTYHCkoq-tTyTYHCkoq uxUKZjc YoJVIJto:YoJVIJto-zgkNeZQ/xWoulrbb/tTyTYHCkoq tTyTYHCkoq:wcG tTyTYHCkoq cRn:wcG zgkNeZQ:zgkNeZQ/wcG-wcG;tTyTYHCkoq.wcG!tTyTYHCkoq zgkNeZQ zgkNeZQ;wcG uxUKZjc_YoJVIJto cRn tTyTYHCkoq wcG,cRn:wcG tTyTYHCkoq,

    result.toString():
    [wcG, tTyTYHCkoq, zgkNeZQ]

    dlGh?dlGh_dlGh.dlGh/dlGh dlGh dlGh dlGh dlGh-dlGh?dlGh dlGh dlGh-dlGh dlGh dlGh;dlGh/dlGh_dlGh dlGh dlGh dlGh dlGh dlGh dlGh dlGh dlGh;dlGh

    result.toString():
    [dlGh]

  • Custom User Avatar

    Imposible to solve in java, AssertEquals is not in the correct order, if you return "abc" it says "expected abc but was covfefe". Fix it, it's easy to fix, come on!

  • Custom User Avatar

    Assert equals is not in the correct order. Is expecting the value that you return.

  • Loading more items...