Ad
  • Custom User Avatar
  • Custom User Avatar

    perhaps the description is a bit ambiguous indeed,
    something like:
    "The priority is that the space to insert the new barrels to be as small as possible."

    maybe it will get better

  • Custom User Avatar

    because the priority is to find the smallest space, if there is a space that fits but it is larger, the choice will be the smallest space

    in this case ['', '', '', '0', '', ''], the smallest space that fits is in indexes 4-5, the space in indexes 0-2 is bigger so they should not be put there

    in the case of the warehouse like this: warehouse = ['', '', '0', '0', '', ''], barrels = ['0', '0'], then the barrels must be inserted in position 0-1, because it is leftmost

  • Custom User Avatar

    The tests are inconsistent with the requirements and among themselves:

    The priority is that the space is as small as possible, so first you must find the smallest spaces that fit, and if there is a tie, place them in the leftmost space.
    When placed, the barrels must be positioned from left to right in the available space.

    implies that array should be filled frol left to right or from index 0 to index -1(in python)

    Some tests follow through with it but some tests don't:
    testing for: warehouse = ['', '', '', '0', '', ''], barrels = ['0', '0']
    ['0', '0', '', '0', '', ''] should equal ['', '', '', '0', '0', '0']

    testing for: warehouse = ['', '', '0', '', '', '0', '0', '', '', '', '0', '', '', '', ''], barrels = ['0', '0', '0']
    Test Passed

    in the first test the issue is that warehouse is expected to be filled frol right to left or from index -1 to 0.
    The issue of the other test is that it is complitely fine if array is filled from left to right or from 0 to -1.

    Otherwise it's a nice task I had fun solving. Thank you for that.

  • Custom User Avatar

    Thank you, I enjoyed creating this

  • Custom User Avatar
  • Custom User Avatar

    You're very welcome, take care.

  • Custom User Avatar
  • Custom User Avatar

    Very funny kata.

  • Custom User Avatar

    what a shame, maybe he doesn't even see that the kata was approved

  • Custom User Avatar

    everything is about sex

  • Custom User Avatar

    simple kata, but which allows for interesting solutions

  • Custom User Avatar

    Santa Claus must still be waiting for this code to run

  • Custom User Avatar

    I think the creator of this kata is simply one of the greatest kata creators on the platform, but no one is perfect :D

  • Custom User Avatar

    I think it's generally a good idea not to take any feedback that points out problems in your kata personally. Try to focus as much as possible on improving the kata and not worry about how the criticism was delivered (that's what's important to you, and your goal is to have a good kata; focus on that). Of course, the goal of the platform is to create a pleasant environment for everyone, but that won't be a problem for you if you simply keep your mind focused on improving.

    I'm a beginner and my first kata was a disaster, but i learned a lot from the criticism and got a approved kata, but i definitely have a lot of room for improvement.

  • Loading more items...