Ad
  • Custom User Avatar

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

  • Custom User Avatar

    :facepalm: okay, done, sorry again

  • Custom User Avatar

    Sorry, you still have to manually republish the kata to put it back in beta lol.

  • Custom User Avatar

    done, really sorry for the waste of time, is my first time creating a kata.

    thanks!

  • Custom User Avatar

    issue resolved, see my last comment

  • Custom User Avatar

    issue resolved, see my last comment

  • Custom User Avatar

    You need to mark the issues as resolved in order to publish the kata again. Right now, it's still in draft.

  • Custom User Avatar

    hey guys, thanks everyone for the feedback <3

    @BobtheLantern you were absolutely right regarding "mad" and "mac", the issue came from a mismatch between the original description and what i actually intended the kata to enforce

    the kata has now been updated to clarify that all prefixes must have the same length, the goal here is to determine the minimum uniform prefix length L such that truncating every word to its first L characters makes them all unique. with this corrected definition, the expected outputs in the examples are now consistent.

    also, according to @CodyTheBot and @hobovsky

    • the description has been rewritten to remove ambiguity
    • submission tests have been updated to reject non-uniform prefix solutions
    • random tests have been added to prevent hardcoded solutions
    • assertion messages were improved to provide better debugging information
    • missing imports in submission tests have been fixed

    thanks again for pointing this out, this definitely helped improve the clarity and quality of the kata

  • Custom User Avatar

    The last prefix should be "mac" instead of "mach" as well.

  • Custom User Avatar

    For test_case_1 with input: ["malaga", "madrid", "mallorca", "merida", "macharaviaya"] you expect the following response: ["mala", "madr", "mall", "me", "mach"]. The second item in your response, "madr", is not correct as it is not the shortest unique prefix. The second item in the response should be "mad" as this prefix is unique throughout the list.

  • Custom User Avatar

    Please fix issues reported by the bot, and fix tests to reject invalid solutions submitted until now.

  • Custom User Avatar

    Hello! I am a Codewars bot, and I reviewed your kata for common authoring mistakes.

    Click to see the review

    Commonly occurring issues

    • ☠️ Missing random tests: Submission tests contain only fixed examples (Long shared prefixes, Different first letters, Order preservation, Bigger dataset) and no randomly generated test cases. Codewars challenges should include random tests in the submission tests to discourage hardcoded solutions and better verify correctness across a wide input space.
    • 🛑 No debugging info on failure: In the submission tests, test.assert_equals calls in tests like Long shared prefixes, Different first letters, Order preservation, and Bigger dataset do not include assertion messages, and the @test.it titles do not show the concrete input values. When a test fails, it will be difficult for users to see which inputs caused the failure; you should either include the input in the it title or pass a message (e.g. f"words={words}") to test.assert_equals.
    • 🛑 Missing required imports: In the submission tests, there are no imports for the testing framework or the user solution. You need to add import codewars_test as test and from solution import shortest_unique_prefix at the top of the submission tests so that the tests can run correctly on Codewars.

    Please mind that I am not a very smart bot, and you should verify my remarks with any resources available for kata authors and translators: