Company: Corridor Platforms
Difficulty: medium
Maximum Cost of Permuted Array Problem Description You are given two arrays A and B which consist of N positive integers each. It is given that the cost of A is defined as the total number of indices where A[i] > B[i] for all 0 <= i < N. You can permute A as you want. Find the maximum possible cost of A. Function description Complete the maximumCost function in the editor below. It has the following parameter(s): N : INTEGER, The number of elements in arrays A and B. A : INTEGER ARRAY, The array A consisting of N positive integers. B : INTEGER ARRAY, The array B consisting of N positive integers. Return The function must return an INTEGER denoting the maximum possible cost of A. Input format for debugging: The first line contains an integer, N, denoting the number of elements in A. Each line i of the N subsequent lines (where 0 <= i < N) contains an integer describing A[i]. Each line i of the N subsequent lines (where 0 <= i < N) contains an integer describing B[i]