Ad
  • Default User Avatar

    If you're talking about the attempt it's working fine. I just finished it a few minutes ago. The other two test cases are to make sure your solution actually works. I'm hinting towards the hint here as they also test if you handled what the hint specified. I was stuck on that and thought just like you it was broken till I really thought about the hint again. If you look at the stack trace and see something other than NPE then this doesn't apply, else it does.

  • Custom User Avatar

    Print the input.

  • Custom User Avatar
  • Custom User Avatar

    It works just fine in javascript. If your code doesn't work, that's for you to fix.

    Test.expect(countSheeps(array1) == 17, "There are 17 sheeps in total")
    //          your function call     ^        Error message 
    //                           expected value
    

    I've changed the tests to use assertEquals instead to make it clear.

  • Default User Avatar

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