Given an array of integers, where leftsum of an index is defined as the sum of integers of the array to the left of the index including the value at the index, and rightsum of an index is defined as the sum of integers to the right of the array, write a program to return the minimum absolute difference between leftsum and rightsum across all the indices.