Ad
  • Custom User Avatar
  • Custom User Avatar

    This kata should specify that only integers are expected in the array.

    Also, the sample example is not necessary at all--and the code provided is not especially Ruby-esque. Array#inject would be better than Array#map.

  • Custom User Avatar

    I disagree. The two values imply different things in Ruby. A return value of nil implies no solution. That is, a solution is unobtainable and so there is no r epresentation for it. An empty Array implies the empty solution, which has zero steps. For instance, the start and end nodes are the same, and so the solution has no steps between reaching the start and end. The empty solution is not possible here because the start and end nodes have different ordinal values, but the convention should still apply here.

  • Custom User Avatar

    I think as-is, this kata is good enough for release, pending one minor change--the error messages. My code failed one of the later tests, but the error message was not helpful in telling me what the problem was. Just telling me where the test case thinks I've gone wrong is not sufficient for a complex problem like this one.

  • Custom User Avatar

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

  • Custom User Avatar

    Very complete list! You are, however, missing a few concepts:

    Algorithms:

    • Bioinformatics

    • Concurrency

    • Parallelism

    Note that parallelism and concurrency are not the same thing. I don't know how much low-level code Codewars will enable, but I feel those concepts could use exploration.

  • Custom User Avatar

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

  • Custom User Avatar

    Why is this kata at 4 kyu? The algorithm it requires is hardly difficult to implement.

  • Custom User Avatar

    This code actually solves the problem for a subset of the solution space. I misread the problem, and understood it as asking me to find the greatest 5-digit number where all the digits are themselves consecutive. The provided test case was not helpful in clarifying the meaning of the description.