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.
I love seeing the simplified method. Makes me understand the process!!
Have the same thing going on at my end
I understand now. Thank you for the explaintion.
luckily I solve this problem alone, but thanks for useful advices :)
have a nice day
There are still problem with the formatting.
A good practice to share some code in the comment is to wrap it around this character -> ```
Write like this :
```
// Beautiful code
```
To have something like this :
Check the preview too! I can help you as soon as I can work around your code :)
Thanks for your reply.
I've got type, i don't know why its don't appear when i paste the code here.
Second tip doesn't help, still the SIGSEGV error occurs.
Here is a proper code:
#include
const std::vector countPositivesSumNegatives(const std::vector input)
{
int neg=0,pos=0;
if (!(input.empty()))
{
for(int i=0;i<input.size();++i)
input[i] > 0 ? ++pos : neg+=input[i];
if (!pos || !neg)
return std::vector();
else
return std::vector ({pos,neg});
}
else
return std::vector();
}
Hey'
The first issue is to have a type associated with the type std::vector.
They might be some other errors (like the return who might be std::vector ({pos,neg}))
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution