Company: Ibm_31oct
Difficulty: medium
Memory Test Number Assignment Problem Description A memory test is being conducted for n students standing in a row, numbered from 0 to n-1 from left to right. The test consists of m rounds. In each round, the teacher calls out a position ( pos ) for round i . The child at that position will be assigned the number 0 . All children to the right of the selected position will be assigned the number 1 . All children to the left of the selected position will be assigned a number that is one greater than the child to their right. For example, if n = 6 and the selected position is 3 , the numbering is [3, 2, 1, 0, 1, 2] . After m rounds, the teacher asks each student to shout out the maximum number that was assigned to them during the m rounds. Your task is to determine the value each child will shout. Complete the function maxValues in the editor below with the following parameters: n : An integer, the number of children. pos[n] : An array of integers, the positions the teacher will call dur