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.
Thanks, that was fast.
The initial code problem has been fixed,
[Bool]
is now[Word]
. My apologies for this oversight.Yes, it is unclear why tube sizes are passed. This is not Haskell-specific though.
ETA: if you have a Haskell-specific issue, consider prodding the translation author under the translation
Suggestion
. I may or may not get notifications for a newIssue
, but I will get notifications for replies to mySuggestion
( because I authored that ).Haskell version
The code template says "balanced :: [Bool] -> Bool" but the required type is
"balanced :: [Word] -> Bool".
Also it is unclear why tube sizes are passed if they are all the same (or 0).
This also groups repeated digits in the integral part.
repeating_fractions(221, 1) => "(2)1.0"
The regexp should probably be /(\d)(\1+)(?!..)/.
Finally a solution in O(n).
Ruby version: Had to
require 'set'
in order to make the test framework work.That's disappointing indeed. The fitness
Proc
expects an integer rather than a binary string. Call it withfitness.call(c.to_i(2))
.This can generate a small subset of the valid strings only.
Fails or 515377520732011331036461129765621272702107522000 (3**100 - 1).
fails for n = 99999999999999999
Oh no. I misread the sentence as "... do not count ..." Stupid me. Sorry for the noise.
Did you only look at the example tests? The submit tests definitely have negative numbers.
aleluya, nice
I checked it. No warnings, no problems. Thank you.
Haskell version. There are no test cases for the requirement:
"hyphens/dashes ("-") for negative numbers do count towards the length"
As far as I can see, all solutions including my own fail that.
Loading more items...