Ad
  • Custom User Avatar

    I agree. Should be 7 or 6 kyu imo.

  • Custom User Avatar

    I replied to your other post; the expected results are entirely correct. Shapes can have holes in them, and those holes are meant to be empty when you return just the shape.

    Think of them as the space between their boundary lines, where the boundary line can be the outside (like a simple square) but also on the inside of the shape (forming a torus or donut or ring).

  • Custom User Avatar

    I think you misunderstood what should be returned. The expected result is entirely correct.

    The last shape is a single undivided shape, no window; the inner square is a hole in the shape, not a structural part of it:

    +---------+
    |         |
    |  +---+  |
    |  |   |  |
    |  |   |  |
    |  |   |  |
    |  +---+  |
    |         |
    +---------+
    

    Here is the same shape with whitespace that is not part of the shape replaced by . dots:

    +---------+
    |         |
    |  +---+  |
    |  |...|  |
    |  |...|  |
    |  |...|  |
    |  +---+  |
    |         |
    +---------+
    

    The shape consists of just the squarish donut with a hole in the middle. The shape you thought you should return is not a single shape; here it is again:

    +---------+
    |         |
    |  +---+  |
    |  |   |  |
    |  +---+  |
    |  |   |  |
    |  +---+  |
    |         |
    +---------+
    

    Notice that line in the middle? That's not part of the outer shape, that's the dividing line between two smaller shapes that fit inside the hole there. Here is your shape with green dots marking the shape you were supposed to extract, and red and yellow x-es for the two shapes you incorrectly included:

    +---------+
    |.........|
    |..+---+..|
    |..|xxx|..|
    |..+---+..|
    |..|xxx|..|
    |..+---+..|
    |.........|
    +---------+
    

    You need to return those two inner shapes separately (which you did, together with the 3rd hole from the other larger A-shaped piece).

  • Custom User Avatar

    I've created a Rust translation, please review and approve!

  • Custom User Avatar

    Then it is not as straightforward as you mention. Only 1/3 of it was ;)

  • Custom User Avatar
  • Custom User Avatar

    The Python tests have long since been updated (including random tests).

  • Custom User Avatar

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

  • Custom User Avatar

    I'm having an issue with this Kata. The errors I'm getting are about mismatch between the expected and actual results in the tests, specifically those where the shape has shapes within shapes. And from what I can see, the expected solution is not correct.

    Can someone have a look at the expected results? If you look at the input shape, you can see that the expected sub shapes do not have the same inner shapes that they should have.

  • Custom User Avatar

    Thank you Chrono79! So, as I said in the first post:

    The expected result doesn't seem to be correct. The final sub shape should look like a window, with two small squares inside a rectangle, but instead it expects a long thin rectangle inside of another. If you look at the source shape, my solution outputs the correct result.

  • Custom User Avatar
    failed on this shape:
    +---------+--+   +--+-+ +-----+
    |         |  |   |  | | |     |
    |  +---+  |  +---+  | | | +-+ |
    |  |   |  |         | | | | | |
    |  +---+  |  +---+  | | +-+ | |
    |  |   |  |  |   |  | |     | |
    |  +---+  |  +---+  | +-----+ |
    |         |         |         |
    +---------+---------+---------+
    
    Actual result:
    +-+ +-----+
    | | |     |
    | | | +-+ |
    | | | | | |
    | | +-+ | |
    | |     | |
    | +-----+ |
    |         |
    +---------+
    +--+   +--+
    |  |   |  |
    |  +---+  |
    |         |
    |  +---+  |
    |  |   |  |
    |  +---+  |
    |         |
    +---------+
    +---+
    |   |
    +---+
    +---+
    |   |
    +---+
    +---+
    |   |
    +---+
    +---------+
    |         |
    |  +---+  |
    |  |   |  |
    |  +---+  |
    |  |   |  |
    |  +---+  |
    |         |
    +---------+
    
    Expected result:
    +-+ +-----+
    | | |     |
    | | | +-+ |
    | | | | | |
    | | +-+ | |
    | |     | |
    | +-----+ |
    |         |
    +---------+
    +--+   +--+
    |  |   |  |
    |  +---+  |
    |         |
    |  +---+  |
    |  |   |  |
    |  +---+  |
    |         |
    +---------+
    +---+
    |   |
    +---+
    +---+
    |   |
    +---+
    +---+
    |   |
    +---+
    +---------+
    |         |
    |  +---+  |
    |  |   |  |
    |  |   |  |
    |  |   |  |
    |  +---+  |
    |         |
    +---------+
    
  • Custom User Avatar

    Well, the text between the backticks greyed out, which indicated to me that it was registering that it is suppose to format that part of the text. But the end result remains the same. maybe because this is a text block and not code, I don't know.

    Oddly enough, it was displaying the text art correctly when I pasted it in, but it changed the formatting when I submitted the message.

  • Custom User Avatar

    Triple backticks are expected to do the trick: https://docs.codewars.com/references/markdown#code-block

    If they did not work, it's possible you did not get them right in some way.

  • Custom User Avatar

    Sorry, I don't know how to format the text. Triple backticks did not do the trick.

  • Custom User Avatar

    Use markdown formatting, as you posted it, it's impossible to see the shapes: https://docs.codewars.com/training/troubleshooting#post-discourse

  • Loading more items...