Company: Tally_14march
Difficulty: medium
Mid Support Problem Description Anurag is doing a class activity, wherein every child is assigned a value. Anurag's teacher has assigned him the responsibility of finding the leftmost child in the line, where all the values sum to the left of that child is equal to the values sum to the right of the child. Can you help Anurag? Input Format: The first integer, N denotes the number of children in the line. The subsequent N lines are the values assigned to the students. Output Format: The output is an integer, denoting the leftmost index (0-based index) in the array, satisfying the condition. If no such index exists, simply return -1. Examples Example 1: Input: 6 1 7 3 6 5 6 Output: 3 Explanation: The pivot index is 3, as the left-side numbers are [1,7,3] the right-side numbers are [5,6], and the sum of both the numbers is 11. Constraints The number of students N: 2 <= N <= 10 4 The values of the students arr[i]: -10 3 <= arr[i] <= 10 3 .