Company: Amex_24july
Difficulty: medium
Task 3 Problem Description You are given an integer N. Create an array A consisting of exactly N integers that satisfy the following conditions: The sum of all elements in A must be exactly 0. All elements in A must have unique absolute values. In other words, if an element X is in A, then neither X nor -X (its opposite) may appear again elsewhere in the array. The absolute value of every number in array A must not exceed the specified limits. Scoring: Your solution will be tested under five different constraints. To earn points in each category, the absolute value of every number in array A must not exceed the specified limit. 20% of the total score for limit = 1,000,000 20% of the total score for limit = 40·N 20% of the total score for limit = 5·N 20% of the total score for limit = 2·N 20% of the total score for limit = N Write a function: class Solution { public int[] solution(int N); } that, given an integer N, returns the described array A. If multiple valid solutions exist, retur