Ad
  • Custom User Avatar

    I was able to pass the Attempt test suite in Rust without any issues. Please post your current solution, mark it as a spoiler and specify the input(s) causing your solution to fail so we may reproduce your issue and determine whether it is indeed a problem with the tests.

    Closing the issue since there's insufficient evidence it's related to the Kata itself.

  • Custom User Avatar

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

  • Custom User Avatar

    Many issues with this Kata:

    Description is vague and difficult to understand

    Example:

    Lego Bricks - 1 Cat Food - 2 Intercontinental Ballistic Missle - 4 A Single Piece Of Paper - 8 (The rest is 0)

    It's entirely unclear how these "values of elements" are derived from the input tuple alone. One could extrapolate and guess that the values of each element should be determined as increasing powers of 2 based on the index within the input tuple, but it's not explicitly specified which is not acceptable.

    Poor choice of data structures

    Tuples are good for data where the number of elements are pre-determined and fixed. They are not for data where the number of elements are variable and cannot be pre-determined - use a list instead.

    Broken tie-breaking logic in reference solution

    Python's built-in sorting functions are stable by default so input order should already be preserved - see my solution below for an example.

    On the other hand, the reference solution does not always preserve input order - it's difficult to present a concrete example given the way the inputs are structured for this Kata but it's possible to confirm this by printing a transformed view of the inputs and comparing the output of my solution from that of the reference solution.


    Please refer to Creating your first Kata for guidelines on authoring a good Kata.

  • Custom User Avatar

    Finally managed to solve this one in Rust, excellent Kata :-D

    I definitely over-engineered my solution though, defining DeltaIterator as a recursive type with Boxes and 'static lifetime annotations - not my proudest solve (-:

  • Custom User Avatar

    Please resolve the following issues with the Kata before re-publishing:

    • Separate the story from the actual Kata task so not everyone is forced to read the entire thing and attempt to extract useful information out of it
    • Kata task is still ambiguous - "length of the pixels that have withstood the test of time" is not well-defined since the array is jagged and rows may be of different length
    • "quivalent" --> "equivalent"
    • Fixed tests should cover edge cases such as when the first row isn't the longest row
    • Add an actual example in the Kata description (just use one of the existing fixed tests) and explain the process so the task is clearly defined

    Also, please refrain from "re-publishing" a retired Kata as-is in the future as that may result in the revocation of your Kata-authoring privileges.

  • Custom User Avatar

    [Rust] Random tests sometimes generate an empty vector vec![] which doesn't match the Kata description saying that an empty matrix is represented by vec![vec![]]

  • Custom User Avatar

    Sure, as long as you don't publish it ;-)

  • Custom User Avatar

    Trivial exercise with zero novelty and educational value.

    Please refer to Creating your first kata for guidelines on how to author a proper Kata.

  • Custom User Avatar

    My solution crashes the timeout test leading to an unexpected pass of the entire test suite (TBH I have no idea why :-P); you might want to look into it

  • Custom User Avatar

    [Python] The sample tests should probably include a case where x = 0, to avoid surprises on attempt

  • Custom User Avatar

    Instead of passing three lists of the same length, why not pass a list of dictionaries with the associated keys instead? Since the three lists are supposed to represent different attributes of the same entry, the latter would be a more natural data type and (assuming it is used in production code) requires less checking for invalid input.

  • Custom User Avatar

    I'm 99.99% certain this is an exact duplicate of at least 1 existing approved Kata, but searching for "1 to n" gave way too many irrelevant results (is Codewars Kata search that broken? :-( )

    Either way, this Kata severely lacks novelty and is therefore unacceptable. Please refer to Creating your first kata for a comprehensive guide on how to author a novel, interesting Kata.

  • Custom User Avatar

    A few issues off the top of my head:

    • The task itself is underspecified - what is meant by "input value have boolean representation"? At first I thought it was any value x that converting to a boolean by bool(x) does not raise an exception, but it turns out to be completely arbitrary and not backed by any particular Python language feature
    • Missing edge cases, e.g. empty list
    • Missing random tests, i.e. fuzz testing

    Please refer to Creating your first Kata for a comprehensive guide on how to author a high-quality, novel, interesting Kata.

  • Custom User Avatar

    I see where you're coming from, your call then

  • Custom User Avatar

    It would probably be a good idea to include some edge cases in the sample tests as well, e.g. converting 24-hour times starting with 00 to 12-hour time, or at least make the behavior for such cases explicit in the description, in order to avoid any surprises when attempting the submission tests.

  • Loading more items...