Company: Netcore backend dev_2nov
Difficulty: medium
Maximum remainder Problem Description You are given an array A containing N integers, where N is always even. In the array, exactly N/2 elements are even and N/2 elements are odd. You are also given an integer k. Choose one even element and one odd element from A. Let their sum be s. You need to compute the maximum possible value of the remainder (sum modulo k) over all such pairs. Let's look at an example for better understanding: Given: A = [1, 2, 3, 4] k = 5 There are two evens (2, 4) and two odds (1, 3) All pairs and remainders: Pick 1 and 2 --> Sum = 3 --> 3 % 5 = 3 Pick 1 and 4 --> Sum = 5 --> 5 % 5 = 0 Pick 3 and 2 --> Sum = 5 --> 5 % 5 = 0 Pick 3 and 4 --> Sum = 7 --> 7 % 5 = 2 The maximum possible value of the remainder is 3. So the answer is 3. Function Description Complete the function find_maximum_remainder(N,A,k) provided in the editor. This function takes the following parameters and returns the maximum remainder: N: Represents the number of elements in array A (N is alwa