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.
ok, I did it
[float('inf')]
ok, I'll do it
It should generally be understood by site practitioners that the description should be universal (language agnostic) and as such when looking at data the type used is not critical, so long as the specs are clear for the user to comprehend and procede coding in the language of their choice.
Otherwise it becomes very messy in terms of maintaining the description as new languages are added.
C Translation
you shouldn't post code like that; anyone can see it.
I added the spoiler flag to your comment
What would the expected return value be if the input was
null
?The site doesn't run code like that.
Your code has a different flaw you have not yet detected.
retired
meanwhile, I just added a comment to the solution set-up that mentions allocation / freeing
I just ran the current version of your solution and it passed all tests.
?
This comment is hidden because it contains spoiler information about the solution
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
.please do not comment on code whereby you reveal solution methods
I have added the spoier tag to your comment
@bad pangolin
The correct result for this test is 18.
Note: it is a subarray of length
1
.Loading more items...