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 prefer the actual description
This comment is hidden because it contains spoiler information about the solution
Thanks. Will fix this and other Katas in which I may have used these undeclared types.
Yes, kind of.
So it's not a problem now but could be a problem in future?
The tests in C++ use potentially undeclared identifiers like
rand
andshuffle
. Just to remind, when C++17 was added to CW, there were maybe 5 katas that were incompatible because of name clashes and things like that and a huge list of those incompatible because they used non-standard features and weren't correct in the first place.Let us know.
Not really an issue. More of a suggestion. It looks like you understood it well enough.
I withdrew the "elements of integers" part as "whose" is likely referring to the array, but the other points stand.
Where do you read "elements of integers"?
The elements are from the array.
The description is extremely unclear.
"You will be given an array of integers whose elements have both a negative and a positive value, except for one integer that is either only negative or only positive."
In this sentence are such gems as "elements" which "have both a negative and a positive value", "except for one integer that is either only negative or only positive" (weird, I thought all nonzero integers are like that!)
I propose:
"You will be given an array of integers such that, for any integer
x
in the array, there exists exactly one integer equal to-x
in the array. There is one exception, an integer that does not have such a complement. You need to find it."You need to calculate the infinite sum (first term is n, each following term is the previous term integer-divided by 2), not just the sum of the first five terms.