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.
range returns a single integer which is not iterable but enumerate returns an integer and the index
This comment is hidden because it contains spoiler information about the solution
I think the clever thing of this solution is that you will only iterate arr to do the sum once. In the current top solution you iterate over it and do the sum len(arr) times making it O(n^2). Also, by using enumerate instead of range(len(arr)) you are already getting the element of the list to add it or substract it from the variables currently containing the sums.
I see that it happens with input:
"one hundred"
in functiontwo_digit_parse
in lineauto word = group.front()
, because group is empty.