Ad
  • Custom User Avatar

    Maybe the return type of the function should be usize instead of u8

  • Default User Avatar

    Cannot invoke "java.lang.Boolean.booleanValue()" because "[]" is null
    how can i resolve this?!

  • Default User Avatar

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

  • Custom User Avatar

    I dont understand where we have the error? Its only a boolean array.
    Where we get NullPointerException?
    Thanks

  • Custom User Avatar

    The plural of sheep is sheep, not sheeps.

  • Custom User Avatar
    • Node 12 should be enabled (Refer this and this for more info)
  • Custom User Avatar
    • The initial solution setup is missing the function keyword

    • Node 12 should be enabled (Refer this and this for more info)

  • Custom User Avatar

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

  • Custom User Avatar

    Ruby should use camel_case

  • Default User Avatar

    Racket example in the description:

    (count-sheeps '(#t #t #t #f #t #t 1
                    #t #f #f #f #f #f #f
                    #t #f #t #t #t #t #t
                    #t #t #f #t #t #t 5))
    

    Why does it have some these 1 and 5? Well, maybe because it isn't specified what values input can contain. Most languages seem to have only true/false/null-nil-undefined-... So the input domain should be specified and consistent across languages.

  • Custom User Avatar

    I've created a NASM translation for this Kata.

  • Custom User Avatar

    All language versions should be updated with random tests.

  • Default User Avatar

    This line in the description is confusing:
    "Don't forget to check for bad values like null/undefined"
    I didn't understood what shoud be returned in that case.

  • Default User Avatar

    I think the description/instructions to this Kata should emphasize that all the coder needs to return is a number value (i.e., the number of sheep). I think most of the people who attempted this Kata were paying more attention to the sample test, especially the line that reads:

    Test.expect(countSheeps(array1) == 17, "There are 17 sheeps in total")

    If they were like me, they were trying to create a function that returns a string/message and were getting the error messages:

    There are 17 sheeps in total, not There are 17 sheeps in total
    There are 500 sheeps in total, not There are 500 sheeps in total
    There are no sheeps at all, you counted There are no sheeps at all

    -which is massively confusing.

  • Custom User Avatar

    You need to add some random test cases

  • Loading more items...