Ad
  • Custom User Avatar
  • Custom User Avatar
    A fruit package with one bad apple, or a bad package, is represented with [2,0] or [0,2]
    
    A fruit package with two bad apples, or a rotten package, is represented with [0,0]
    
    

    What do they mean by this?

  • Custom User Avatar

    As mentioned by B4B below, this is not well explained (Also note how fruits in a package are ordered when repacking. Example shown in INPUT/OUPUT above.)

  • Custom User Avatar
  • Custom User Avatar

    Python 3.8 should be enabled.

  • Default User Avatar

    You should have let this issue opened, the process to eliminate boxes on the run is really unclear.

  • Default User Avatar

    i got it right except... my code can't hande empty boxes. i get "out of range" msg.
    any ideas?

  • Custom User Avatar

    Well, you should raise a question instead in this case. Otherwise we're confused too ;-)

  • Custom User Avatar

    Hi,

    I didn't mean to imply that there was something wrong with the kata. I was just confused by the random tests. Thanks for the tip about printing the input to the console.

  • Default User Avatar

    Hi,

    First, this is not an issue, this is a question. "Obviously", since 97 people already completed the kata in JS, it's a problem in your code, not in the kata (issues are for the latter case).

    About your question, so: yes, there are random tests that your code has to pass. That means your code doesn't handle properly some edge case that appears in the random tests only. You should print the input to the console to debug your code.

  • Custom User Avatar

    Okay, this is strange. I am getting a type error for an undefined object property but each time I run the attempt I pass a different number tests, even without changing the code. Doesn't it always run the same tests? How can I be passing 20 tests in some runs and 0 in others with the same code?

    I also can't debug the type-erros since I am not being shown the input that produces it. It passes all the sample tests plus more sample inputs I came up with. I can't see why it would produce the type error.

    Any suggestions?

  • Default User Avatar

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

  • Default User Avatar

    when a C++ translation is done by somebody.

  • Custom User Avatar

    When can i submit in C++?

  • Custom User Avatar

    Expected and actual were swapped, fixed.

    That's really a question though ;-), and please mark your comment as spoilers if you have code in it.

  • Loading more items...