Given an array nums, for each nums[i] find out how many numbers in the array array are smaller than it. That is, for each num[i] you have to count the number of valid j's sunch that j != i and nums[j] < nums[i].
the answer in an array.
Example:
Input:
nums = [6,5,4,8]
Output:
newNums = [2,1,0,3]
Example 2:
Input:
nums = [7,7,7,7]
Output:
newNums = [0,0,0,0]
Published By : Jaivik Shah