Ad
  • Custom User Avatar

    When I made my code I used the algorithim sieve of erostheneas, and I noticed something about this test case assertEquals(7,Solution.solve(new int [] {1,2,3,4}));
    it's wrong. The prime indexes are 0, 2, 3 the values of those indexes is 1, 3, 4 when added together..the result is 8 not 7. This is an issue is there a misunderstanding
    of the rules?

    There's a similar issue with this test case(it's one of the sample ones) assertEquals(14,Solution.solve(new int [] {1,2,3,4,5,6}));
    here's a screeen shot proving that this specific test case is wrong.

    https://imgur.com/a/S88fKSX

    Actually this is a problem with the last sample test case also.

  • Custom User Avatar

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

  • Custom User Avatar

    assertTrue("'Can we merge it? Yes, we can!' is a merge of 'an e mrgite, we a!' and 'Cwee ? Yscn'", StringMerger.isMerge("'Can we merge it? Yes, we can!' ", "'an e mrgite, we a!'", "'CnwemrgtYescn' "));

    This test case is wrong....... as the order is messed up and the string length doesn't queal the length of part1+part2 making it impossible to merge correctly.

  • Custom User Avatar

    I see I assummed I was nit just counting the number of characters that repeat, but also the number od times I assumed that was somewhat implicit my bad.

    I shoukd be able to easily fix this.

    My code logic was wrong.....

  • Custom User Avatar

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

  • Custom User Avatar

    How does the tax work tell me the math behind these intructions I don't understand these intruction plz explain them.

  • Custom User Avatar

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

  • Custom User Avatar

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

  • Custom User Avatar

    I didn't run it in an idle, because when I created a folder in visual studio it didn't allow me to creat a java file in it on intellij now can you please help me?

    and junit wouldn't import

  • Custom User Avatar

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

  • Custom User Avatar

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

  • Custom User Avatar

    How do you make this Grid I have an idea on how to traverse it but how to make it?

  • Custom User Avatar

    What size should the grid have? The description said(You live in the city of Cartesia where all roads are laid out in a perfect grid) 1. How to make this grid) 2. What should its size be?