Company: Publicis_Sapient___
Difficulty: medium
Count Balancing Elements in an Array Problem Description Given an array of integers, an element is called a balancing element if, after removing it (and shifting subsequent elements left), the sum of elements at even indices equals the sum of elements at odd indices in the new array. Your task is to compute how many balancing elements exist in the array. Input: An array of integers: arr Output: An integer representing the number of balancing elements. Examples Example 1: Input: arr = [5, 2, 5, 8] Output: 2 Explanation: Removing either arr[0] or arr[2] balances the sums. Constraints 1 ≤ n ≤ 2 × 10^5 , where n is the size of the array 1 ≤ arr[i] ≤ 10^9