Sum of All Odd Length Subarrays | LeetCode 1588 | Explained and Java Code