Ad
  • Custom User Avatar
  • Custom User Avatar
  • Default User Avatar

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

  • Custom User Avatar
    • Crystal: test logs are unusable:
    
    Time: 7048ms Passed: 0Failed: 2Errors: 2Exit Code: 1
    Test Results:
    Basic Tests
    should return expected
    
    <FAILED::>Value is not what was expected
    
    Backtrace
    Completed in 1.4576ms
    Completed in 180.3962ms
    Random Tests
    should return expected
    
    <FAILED::>Incorrect output
    
    Backtrace
    spec/solution_spec.cr:2:3 in 'testing'
    spec/solution_spec.cr:35:7 in '->'
    /usr/share/crystal/src/primitives.cr:255:3 in 'internal_run'
    /usr/share/crystal/src/spec/example.cr:33:16 in 'run'
    /usr/share/crystal/src/spec/context.cr:18:23 in 'internal_run'
    /usr/share/crystal/src/spec/context.cr:330:7 in 'run'
    /usr/share/crystal/src/spec/context.cr:18:23 in 'internal_run'
    /usr/share/crystal/src/spec/context.cr:147:7 in 'run'
    /usr/share/crystal/src/spec/dsl.cr:274:7 in '->'
    /usr/share/crystal/src/primitives.cr:255:3 in 'run'
    /usr/share/crystal/src/crystal/main.cr:45:14 in 'main'
    /usr/share/crystal/src/crystal/main.cr:119:3 in 'main'
    __libc_start_main
    _start
    ???
    Completed in 0.0838ms
    Completed in 1.723ms
    
  • Custom User Avatar

    Actual and expected are swapped in PHP

  • Default User Avatar

    C

    Description says "return an empty array if your array is empty", but tests require null to be returned.

  • Custom User Avatar

    Some of the test cases do not match the problem statement. One simple one that I encountered is:

    '500' should return 'true' -  Expected: true, instead got: false
    

    The problem statement says "write a function to test if the number contains a numerical palindrome" and "numerical palindrome" has excluded cases with leading zeroes in the other kata in this series. In "Numerical Palindrome 3.5", for example, there's a test case for finding all numerical palindromes in 1001331, and 00 is not in the expected result list.

    The same reasoning should apply in cases like 1050 or 10503, where 050 is not a valid numerical palindrome.

    I suspect that the validation code misses this test case, just as my first submission did. It was only on a "train again" to fix my error that I discovered this issue. I see the same omission in most of the accepted submissions, as well, so I don't know how this ought to be fixed.

  • Default User Avatar

    Random tests does not match with the description in Ruby
    Testing for "llufDiEq IeGYgieZneFrB envFAeckiEhjLq KBonDFes. xxPlH xxAouEsz. qrEmE ViENhPc DRsBDxieRkh UBX. MjJsvGWy zBMVbBf. pDsqWNH DIcV hrZeNwcXOMN XgE."
    Expected: "Llufdeiq eigygeiznefrb envfaeckeihjlq kbondfes. Xxplh xxaouesz. Qreme veinhpc drsbdxeirkh ubx. Mjjsvgwy zbmvbbf. Pdsqwnh dicv hrzenwcxomn xge."

    But from description virus only capitalized some letters, not downcased any; so first letter in "xxPlH" could not be "X" before virus and "x" after virus according to description.
    Same issue with words llufDiEq, pDsqWNH and qrEmE

  • Default User Avatar

    In Ruby reference solution returns true for 100.
    So if 010 is a valid numerical palindrome - that should be stated in description, I think.
    Otherwise reference solution should be fixed.
    And adding test cases for such numbers would be also a good idea

  • Custom User Avatar

    The radnom test cases sometimes fail to verify certain cases, for my solution it sometimes passes everything and sometimes not, so it is obvious that it is a wrong solution, but if you re-run the random test cases, it will pass at some point.

  • Custom User Avatar

    In JavaScript I was able to get a solution which sometimes passed and sometimes failed the random submission tests.

    Kata needs fixed submission tests for numbers like 59995.

  • Custom User Avatar

    Hi! Thanks for this Kata ๐Ÿ™ I learned what a palindrome is with this exercise and have to admit, it would be nice to include a single digit number input in the sample tests, like so:

    Test.assertEquals(palindrome(3),true);
    
  • Default User Avatar

    The test cases don't always include a number with (00), such as (400) or (800).

    One of my solutions would pass on the anytime the test wouldn't include (00), but would fail if it did.

  • Custom User Avatar
  • Default User Avatar

    JS: Node v14 should be used along with its appropiate assertion tools (Mocha + Chai).
    Refer to this and this

  • Loading more items...