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.
It is a generator btw.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Also, examples show "17 17". It is not clear what this is intended to convey.
The input is
0 [-1]
. Actual and expected are not shown; this could be achieved by replacing==
by===
. Random tests do not actually guarantee "All numbers in will be positive integers", just that they are non-zero, but generated zeroes will be shown as input.The string can be converted to a set directly
Yep, the contents of wiki are very different and tests are not passing. Too bad, because this kata is very real-life unlike most of them here.
I'm confused as to why it knows c represents characters in the strings
Fixed. All solutions invalidated I guess. :P
A logic that works for Ruby isn't working for Haskell. There should be consistency across languages. Only 1 default test isn't helping either. We're left with having to attempt trial and error method to fix issues.
I don't know why I am encountering negative indices in Haskell. Shouldn't '>' be explicit. Even if I assume it when it's actually absent, I am not getting the results the tests expect.
i added a return value to the initial code so that it does not throw
proper assertion messages for C
Crystal random tests seem incorrect:
n = 65_u64, p = 10_u64
I ran these inputs on python and javascript solutions (including your own, author) and they're indicating my answer is correct.
I just ran this and I'm not getting any errors:
Issue with the Crystal variant. Getting the below error. Tried removing all my code and still getting it. Seems like something wrong with the tests.
Error in line 1: while requiring "././spec.cr"
in spec.cr:3: while requiring "./fixture"
require "./fixture"
^
in fixture.cr:27: instantiating 'dotest(UInt64, UInt64, UInt64)'
in fixture.cr:3: instantiating 'diagonal(UInt64, UInt64)'
in solution.cr:1: type must be UInt64, not Nil
def diagonal(n : UInt64, p : UInt64) : UInt64
Loading more items...