Company: Publicis_Sapient___
Difficulty: medium
Count Balancing Elements in an Array Problem Description You're given an array of integers. Call one of its elements a balancing element if deleting it (and shifting everything after it one slot to the left) leaves an array where the sum of values at even positions equals the sum of values at odd positions. Your job is to count how many such balancing elements the array contains. 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: Deleting either arr[0] or arr[2] leaves the even- and odd-position sums equal. Constraints 1 ≤ n ≤ 2 × 10^5 , where n is the size of the array 1 ≤ arr[i] ≤ 10^9