Company: IBM_21july
Difficulty: medium
Question 2 Problem Description In a web page rendering system, n rows and m columns represent a grid-like layout for the page content, with each cell containing an element's visibility score. The task is to adjust the visibility of each element so that, for any element at position (i, j), all elements in the same column at positions (k, j) with k >= i have a strictly lower visibility score. Each element's visibility can be increased by one at a cost of one unit. Implement a function that determines the minimum cost to adjust the visibility of all elements in the grid while satisfying the given conditions. The function getMinimumCost takes the following inputs: int visibilityScore[n][m] : a 2-D array representing the visibility score of the elements in the layout grid. The function should return minimum total cost required to adjust the visibility score of all elements as per the constraints. Examples Example 1: Input: n = 3 m = 2 visibilityScore = [[2, 5], [7, 4], [3, 5]] Explanation: