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 task is not correct.
"and returns true only if the function in the params returns true for exactly one (1) item in the sequence."
The function can return something like "yes" and you should see at as True, otherwhise some tests fail.
What's the point if one solution could do for the entire series?
Language is not relevant here. It's implementation problem.
I was doing it with C#....
No, you didn't (or at least, no with your current java code), if you have an empty array and n = 4, your code tries to return a 4 (currently 5) elements array, not an empty one. Also note this error:
You're doing something wrong there.
I tried passing an empty array and it didn't work
Well, you just got to apply some logic, and there are also fixed tests that show you expected result.
What's the result of taking 0 items of any array? What's the result of taking 100 items of an empty array? In both cases it's just an empty array.
Missing description for what is expected when n is 0 or array is empty
Вначале, не мог разобраться с условием, но немного погуглив и поразмышляв, понял как решить, всё получилось
The problem was surprisingly straightforward! I tried solving it with a new approach. Thanks for the effort in designing this challenge!
Very bad description
im getting some problem with this in randon tests, all the test is passing but in the randon tests, seens like the length passed in the argument and the array checking is wrong
This comment is hidden because it contains spoiler information about the solution
Link removed.
Approved.
Loading more items...