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.
Because for char in s, we are iterating over each character in the string s, and for each character c, we are multiplying it by 2 (c * 2) to create a new string with the character repeated twice. The join() method is then used to concatenate all the doubled characters into a single string.
Fixed in this fork, re-raised for Haskell
Yes, Haskell.
Are you solving this in Haskell? There is already an open issue raised below.
Not sure if I am missing anything but I am seeing a strange issue. For all negative values of n, the tests seem to be expecting me to return the array as it is. But that is not what the description says.
duplicate of this issue (the label for the Q42 fixed test is outdated)
This is really quite novel. Nice!
It's not dissimilar to a 'for' loop with a list. Think of it as 'for [any item] in [what I'm telling you to look at]'.
In this case we're telling the program to look at a string, so the 'any item' is just 'any/each individual letter'. 'C' is simply a placeholder for that.
I appreciate this is checks watch 11 months late, but I hope it helps if you ever return here!
Fixed in this fork
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
Loading more items...