Product of other elements in list
Single File Programming Question Problem Statement Arjun is developing a feature that processes a list of numbers and, for each element, calculates the product of all other elements in the list. The result should exclude the current element itself during multiplication. He writes a method computeProduct() inside the class ProductExceptSelf to perform this task efficiently and display the final array of results. Input format : The first line of input contains an integer n, representing the number of elements. The second line of input contains n space-separated integers representing the array. Output format : The output displays the transformed array in a single line where each value is the product of all elements except the one at that position. Refer to the sample output for formatting specifications. Code constraints : The given testcases fall under the following constraints: 2 ≤ n ≤ 104 −104 ≤ arr[i] ≤ 104 Sample test cases : Input 1 : 4 1 2 3 4 Output 1 : 24 12 8 6 Input 2 : 4 -1 2 -3 4 Output 2 : -24 12 -8 6