Ad
  • Custom User Avatar

    B1ts please take a look at fixed test 4(at least in java): it asks for 4 nonexistent categories, and expects them return nothing.

    I agree that handling of empty categoroes is confusing in this problem, but it is covered by the last statement of the "Task" section. its not an error with test cases, but with poor output of tests coupled with strange arbitrary requirements in the spec.

  • Custom User Avatar

    when there are 0

    When there are 0 of what? Arguments? Quantity? It doesn't matter how many there are, you need to add every category to the result (even if there's no books). Printing function arguments might help.

    I ran your current code and a random test with stocklist = ['WQHXKEHMJC 201', 'LYUYOJBCUT 158', 'BDZVLXTMTA 562', 'KQBYGDDWLL 928'], categories = ['R'] returned '', when the expected result is '(R : 0)'. The result is based on categories, and seems correct to me.

    There's no issue with kata results that I can see, but feel free to reply.