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.
Description states:
Hence:
0
]
. that is past the end.This comment is hidden because it contains spoiler information about the solution
That makes sense. However, such tests would invalidate some (incorrect) user solutions. It doesn't matter if arrays are of size 4 or 5 but it does matter if one array is 5 and the other 4.
Description mentions that
Each array includes only integer numbers
. So, empty arrays should not be considered. Also, arrays of different length do not affect how such problems are solved, so I would say it is more on perspectives. Plus, unifiying each language in terms of test cases can be difficult because translations can be done by any user once they reach a specific honor threshold, though efforts on improvising these have been done more actively latelylove the comments
This comment is hidden because it contains spoiler information about the solution
I like the comments and variable names
This comment is hidden because it contains spoiler information about the solution
Shouldn't all of them do that? I was wondering if there is a reason why they don't.
I think it is important thing to think about (that arrays may have different length) and therefore to test for. Arrays could be empty too but I guess the description vaguely hints that there will be integers (and only) inside.
Do you think it would make sense for me to extend the test cases? Assuming I am allowed to do so.
Yet another 8 kyu (the smiplest) task which is not that simple actually.
But it is good practice, I liekd it.
Some languages have such tests. This constraint isn't mentioned in description, but the author probably chose equal arrays anyway. I don't think it would impact the rating at all.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
With code formatted like that hardly anyone will bother to try to read it. Use markdown as suggested.
I find it hard to follow your logic. Maybe it is too late/early for me.
One thing I did notice is that this two codes differ.
The local one is actually invalid because the function does not return anything (should return
bool
). Not to mention the strayinclude
at the beginning and lack of necessary ones.You can't interchange
return
andcout
. Those do not have the same behaviour.return
stops execution of a function,cout
does not.The problem with passing the kata is somewhere else though. Try to test
(({{[[]]}}))
as suggested. Follow the code execution or try to follow the algorithm yourself, possibly on a paper. There is a problem with your logic or the expression of said logic.I don't believe that interchanging
int
andbool
is a good idea.Loading more items...