Company: Tiger_Analytics_9jan
Difficulty: medium
Array Operations: STL Map Description Given is an array A , containing N unique integers. You have to sort the array in ascending order and count the number of array elements whose new index is greater than or equal to their original index. Note: The number and elements of array A before and after sorting in ascending order remain the same. Input Format The first line contains an integer, N , denoting the length of the array A . The second line contains N space-separated integers, denoting the elements of the array A . Output Format The output contains a single integer representing the count of elements where their original index is less than or equal to their new index after sorting (i.e., original_index ). Sample Input 5 7 2 4 3 6 Sample Output 2 Explanation Given an array A = [7, 2, 4, 3, 6] . The original indices for these elements are [0, 1, 2, 3, 4] respectively. After sorting, the array becomes [2, 3, 4, 6, 7] . The new indices for these sorted elements are [0, 1, 2, 3, 4] . Let