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.
OP solved it, closing
This comment is hidden because it contains spoiler information about the solution
The arrarys can improve readability, the only problem is that O(n) has a bigger constant.
the problem is... python. It's too much of "battery included" (see below).
6 kyu for this question is insane!!!!!!!!! 5 kyu- understandable
It's a fun problem though!!
This comment is hidden because it contains spoiler information about the solution
C# instructions do not tell how to count values. I had to check from the hard version.
This comment is hidden because it contains spoiler information about the solution
A delimiter is a character that separates values so that you know each one is separate from another one. A delimiter can be any character, but it is most commonly: a comma (","); a colon (":"); a space (" "); a semicolon(";") or a dash ("-").
The split function separates value by their delimiter, you have put the delimiter as a comma even though the delimiter is a space. An example is:
-1 50 -4 20 22 -7 0 10 -8
where you can see each value is split by a space. Since you put the delimiter as a comma, the split function will look for the comma character in order to separate each value, however there is none so it just gives a list of length 1.What does a delimiter do exactly?
The delimiter is a space character, not a comma - change .split(',') to .split(' ')
This comment is hidden because it contains spoiler information about the solution
Thank you so much!! It worked!
You are using Python 2.7.6 which makes use of integer divison where division results are floored (1/2 returns 0 instead of 0.5 because 0.5 floored is 0). You can fix this by stating it should be float divison (add a decimal point to one of the numbers - 1./2 or 1/2.) or you can change the Python version to Python3 which uses float divison by default and not integer division.
This comment is hidden because it contains spoiler information about the solution