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.
"WARNING: Segment may contain billion elements, to pass this kata, your solution cannot iterate through all numbers in the segment!"
the point of this kata is to come up with an idea how to calculate the result very fast without even going through the sequence and it requires making some observations about binary numbers
good luck! =]
Which language?
It is not pointed out whether we search for contiguous subarrays or not.
I feel like it can be ambigous
Please review the tests once again now =) thanks for feedback
All test, except the last one, are random and checked with my solution, which was checked by brutal force. The tests are in vectors so that It is easier to make fair translations
I made a terrible mistake writing function signature, and this code is correct, only result type should be changed to long long.
Thanks for forbearance
I made a terrible mistake writing function signature, and this code is correct, only result type should be changed to long long.
Thanks for forbearance
I made a terrible mistake writing function signature, and this code is correct, only result type should be changed to long long.
Thanks for forbearance
Hi, I've just repaired c++ version, because answer for the biggest segment cause 'int' type to overflow, so I changed that to 'long long'. If you fix the issue in this translation, I will publish it.
HUGE thanks
done=), thanks
If you find this kata and it will be truly similiar to this one, I will delete mine
Look at the examples in both, but you were right in case of similar names, so I changed mine a bit to make it more clear, thanks for noticing
Thanks for informing. I fixed it, sorry for newbie kata errors =)
Thanks for feedback. I totally agree with you. I will improve the kata later today