Input: arr[] = {1, 2, 3, 4, 5, 6}, Q[][] = {{1, 7}, {2, 4}, {1, 5}, {2, 6}} Output: 4 5 Explanation: The first query is used to add 7 in the array. The array arr[] becomes: {1, 2, 3, 4, 5, 6, 7} The second query is to find 4th smallest element. It is 4 in this case. The third query is used to add 5 in the array. The array arr[] becomes: {1, 2, 3, 4, 5, 5, 6, 7} The fourth query is to find 6th smallest element. It is 5 in this case. Input: arr[] = {2, 4, 2, 1, 5, 6, 2, 4}, Q[][] = {{1, 3}, {2, 2}, {1, 10}, {2, 7}} Output: 2 4