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 error message points out that you are trying to get a
.name
fromundefined
.When you do
a - 1
when the value ofa
is0
, you get a negative index which itself then produces a result ofundefined
.This comment is hidden because it contains spoiler information about the solution
ducks now on dart
Translation Dart
input for goose may be None, so make sure you account for this type of value
We don't need dsa for this.
.map is just a transformation function.
For JavaScript of course not
this is useless information, it should instead say what the input will look like (or say nothing if that's already implied)
The instructions did not specify how to use the arguments appropriately.
nah
Approved.
Yes, that's why I'd like to see input ranges always documented. When they are not, I assume that anything should work (no overflows, bogosort doesn't time out, ...), otherwise it's not clear what is expected to work and what isn't.
Also, when not everything is specified, I start thinking about it less like about competitive programming and more like about a real world task where the input range is consistent with the story.
To be fair, "big" and "straightforward" are extremely subjective terms. However, out of consideration for the 8kyu level, I've forked my translation here to limit the random inputs to the same range as the other translations (except PHP).
(edit) I've also updated the description to add the input range for random tests (in all languages but PHP).
The input range isn't specified and the nature of the problem suggests than the input is small.
Haskell has big numbers in the random tests, the most straightforward solution times out.
Approved
Haskell translation
Thanks for your comment. The sample tests are static/hard coded. They'll always become outdated. and sorry for the indexing :)
Loading more items...