Counting Elements In Two Arrays
medium
Given two unsorted arrays arr1[] and arr2[]. They may contain duplicates. For each element in arr1[] count elements less than or equal to it in array arr2[].
Constraints
1 <= m,n <= 10^5 1 <= arr1[i],arr2[j] <= 10^5
Format
Input
Input is managed for you
Output
Output is managed for you
Example
Sample Input
6
1 2 3 4 7 9
6
0 1 2 1 1 4
Sample Output
4 5 5 6 6 6