Minimum increments or decrements required to signs of prefix sum array elements alternating
Given an array arr[] of N integers, the task is to find the minimum number of increments/decrements of array elements by 1 to make the sign of prefix sum of array alternating. Examples: Input: arr[] = {1, -3, 1, 0}Output: 4Explanation:Following are the operations performed on the given array element