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.
You can do that to check if you want, but the tests dont read from the console. The console is just for humans, the tests only care about what you return from your function.
hmm okeeey, I mean i print the return in main function to check the value of my return. Is it wrong? Sorry i'm new in coding challenge
You are supposed to return the array, not print it to the terminal
yes, i have done it. Its fine in my compiler (Intellij IDEA comunity). The terminal print "[]" for null array input test. And other test are also fine too
Hi, I don't use Kotlin but it looks like an error message due to empty input array - are you sure your code implements this:
"If the input is an empty array or is null, return an empty array."
correctly?
error: null can not be a value of a non-null type Array
assertArrayEquals(arrayOf(), countPositivesSumNegatives(null))
my sample test its fine, but when i attempt my code thats eror appear
LANGUANGE = KOTLIN