Given an array Arr of size N containing positive integers. Count number of smaller elements on right side of each array. Example 1: Input:
N = 7
Arr[] = {12, 1, 2, 3, 0, 11, 4}
Output: 6 1 1 1 0 1 0
Explanation: There are 6 elements right
after 12. There are 1…