Problem Statement
Given an integer array arr of size n, return an array of the same size where the value stored at the $i^{th}$ index of this newly formed array denotes the sum of the subarray of arr that starts from the $0^{th}$ index and ends at the $i^{th}$ index.