• + 0 comments

    they give you a and b. I chose to ignore the 1-based, 0-based issues and that was ok. for instance result_array[2] is just 2, not 2-1 or 2+1 to compensate for going back and forth between 0-based and 1-based. It passed all the tests, even though I hated doing it that way. The only other thing is, they give you a start index and an end index (a and b) and you need to consider: ADD at the start index and SUBTRACT just after the end index. so result_array[b+1] -= k. -- hope that helps.