출처 : https://leetcode.com/problems/how-many-numbers-are-smaller-than-the-current-number/
Given the array nums, for each nums[i] find out how many numbers in the array are smaller than it. That is, for each nums[i] you have to count the number of valid j's such that j != i and nums[j] < nums[i].

class Solution {
public int[] smallerNumbersThanCurrent(int[] nums) {
int index = 0;
int[] counts = new int[nums.length];
for (int n = 0; n < nums.length; n++) {
int count = 0;
for (int m = 0; m < nums.length; m++) {
if (nums[n] > nums[m]) {
count++;
}
}
counts[index++] = count;
}
return counts;
}
}