1365. How Many Numbers Are Smaller Than the Current Number Posted on 2020-07-22 | Edited on 2020-07-23 | Views: 12345678910111213class Solution { public int[] smallerNumbersThanCurrent(int[] nums) { int[] res=new int[nums.length]; for(int i=0;i<nums.length;i++){ int cnt=0; for(int j=0;j<nums.length;j++){ if(j!=i&&nums[i]>nums[j]) cnt++; } res[i]=cnt; } return res; }}