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.
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
Expected results are inconsistent between Haskell and Ruby, Crystal. The same input expects different results. For example an input of 696 expects 38 in Haskell but 23 in Ruby.
1.0 has been enabled so I am goingto reject the forks
This comment is hidden because it contains spoiler information about the solution
Solution works fine in Ruby and Crystal but times out in Haskell?
Awesome!
Loading more items...