Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Agree with sigod. It feels too easy to be a 6.
Honestly, this kata feels too easy even for 6 kyu. Maybe it should be ranked as 7 kyu.
WTF
When the task is asking for the two largest numbers in an array, I fail to see how a solution which actually sorts the entire array is a best practice...
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 thanArray#map
.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.
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.
This comment is hidden because it contains spoiler information about the solution
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.
This comment is hidden because it contains spoiler information about the solution
Why is this kata at 4 kyu? The algorithm it requires is hardly difficult to implement.
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.