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.
E x a c t l y .
Thanks for writing, I had this problem.
@joh_pot what do you mean by the term "bite"?
So I also thought about this question, why do not the tests extend to the letter Y?
Exactly.
Ah, please excuse me, I just thought that the sequence can consist of any numbers in the original array, that is, they can be unordered. And here we were talking about an ordered sequence, that is, an order, like the original array.
The longest non-negative sequence is 5 in the example you provided. you think it's 7 because you mistakenly omitted one of the -1 values in the sequence.
You can suggest some clarification in the description if it's not clear enough. Sequence vs sub-section for instance.
the assignment says "find the LONGEST non-negative sequence", as you said, the correct answer has a length of 5, but what about my version with a length of 7, it is more in fact .. And according to the assignment it is most suitable ..
As Chrono79 explained, 5 is the correct answer for that input.
it was on Javascript
It seems it's Python:
There are three
-1
in a row there, the expected answer of 5 is ok0, 0, 0, 1, -1
Those are 2 sub-sections.
which language?
This comment is hidden because it contains spoiler information about the solution
This call doesn't make sense: if evap_per_day and threshold are different from zero how can you have a content of 0?
How can you have gas lost if there is no gas? Moreover the description says: "All numbers are strictly positive."
Loading more items...