odd_count and even_count to 0, and result to 0.num in the array arr.num to the running sum.odd_count and add even_count + 1 to result.even_count and add odd_count to result.result modulo 10**9 + 7 to handle large numbers.result.