Ad
  • Custom User Avatar
    • Sample tests noItemsJustMoreTimesDeclared and someNoValuesAsWellAsSomeHaveValuesAssigned are expecting incorrect results
    • Please remove unexplained weird special cases like "empty data containers"
    • Author's solution occasionally but reproducibly times out. The performance tests need to be more lenient.
    • Please provide number of random tests and input size in kata description.
    • Please use Markdown formatting and follow kata description [structure guideline]. The current conversational style has a lot of useful information but it's poorly formatted, completely mixed up, and mixed in with a lot of unnecessary words, so it's very difficult to refer to when coding.

    Some possible improvements

    • Better feedback in random tests: Consider adding a print every, say, 100 tests to let user know how much more to optimize.

    More comments in spoilered comment below:

  • Custom User Avatar

    Coding style and practices:

    • items should be passed as a const reference to the user solution,
    • Snowhouse has EqualsWithDelta matcher, there is no need to calculate the tolerance by yourself.
    • Why are items represented as vector of a fixed size of 3? What's wrong with making them a dedicated structure, or at least a 3-tuple?
  • Custom User Avatar

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

  • Custom User Avatar

    Description should be language-agnostic.

    Particular encodings should be generalised over; for the description, focus on underlying concepts instead of language-specific encodings. Eg, "std::vector [1,0,1]" should just be "list of bulb states [true,false,true]".

    Note: a bulb state is not 0 or 1, it's on or off, so it should be encoded as an Enum, or maybe a Boolean. If your language doesn't have Enums or Booleans, specify the encoding in the initial solution or a language-specific block. Use appropriate datatypes!

  • Default User Avatar

    it is likely that this is a duplicate. you should check