Ad
  • Custom User Avatar

    For input, (70000, 70245) : 70001 70009 70061 70079 70121 70141 70163 70241
    I got primes => 70001,70009,70061,70079,70121,70141,70163,70207,70241

    It failed because 70207 is not in solution list but it a backward prime as well as lie in range. Test cases are not correct. Can anyone explain me why 70207 is not a backward prime.

  • Custom User Avatar

    Very concise solution. Just 1 doubt I looked for isLetter/isDigit but there is no such method.

  • Custom User Avatar

    Thanks. I understood later after reading all comments on discussion. They have poorly explained the problem.

  • Custom User Avatar

    I didn't understand this test case:
    revrot("733049910872815764", 5) --> "330479108928157"

    After spliting, we will get (73304,9910872815764). First number is odd, so we shift it and get 33047.Second number is odd again. So we will get 9108728157649. After merging both, we don't get expected answer.
    Can any one please explain me? Any help will be appreciated.

  • Custom User Avatar

    All test cases have been passed but it gave Exit Code: 1 when I attempted. Not sure what it means?
    Anyone please guide me. Thanks

  • Custom User Avatar

    Oh. My mistake. Apologies for inconvenience.

  • Custom User Avatar

    I didn't say sample test. All test case passed when i attempted.

    Time: 10719ms Passed: 6 Failed: 0 Exit Code: 1
    SquaresPerimeterSuite
    Fixed Tests perimeter(5) should return correct answer
    Fixed Tests perimeter(7) should return correct answer
    Fixed Tests perimeter(20) should return correct answer
    Fixed Tests perimeter(30) should return correct answer
    Fixed Tests perimeter(100) should return correct answer
    Fixed Tests perimeter(500) should return correct answer

    It didn't say algorithm is slow. So issue is not resolved yet.

  • Custom User Avatar

    I don't understand the reason why my code is failing. All test cases have been passed and there is no error related to execution time as well.

  • Custom User Avatar

    I am new here so want to know that how can I know the input of random test? My solution is working for all test cases except 1. It is breaking for one -> 1 was not equal to -1

    Not sure when -1 will be output.

    Any help will be appreciated.

    Thanks