File tree Expand file tree Collapse file tree 1 file changed +0
-17
lines changed
src/main/java/com/fishercoder/solutions Expand file tree Collapse file tree 1 file changed +0
-17
lines changed Original file line number Diff line number Diff line change 3
3
import java .util .Arrays ;
4
4
import java .util .List ;
5
5
6
- /**
7
- * 315. Count of Smaller Numbers After Self
8
- *
9
- * You are given an integer array nums and you have to return a new counts array.
10
- * The counts array has the property where counts[i] is the number of smaller elements to the right of nums[i].
11
-
12
- Example:
13
-
14
- Given nums = [5, 2, 6, 1]
15
-
16
- To the right of 5 there are 2 smaller elements (2 and 1).
17
- To the right of 2 there is only 1 smaller element (1).
18
- To the right of 6 there is 1 smaller element (1).
19
- To the right of 1 there is 0 smaller element.
20
- Return the array [2, 1, 1, 0].
21
-
22
- */
23
6
public class _315 {
24
7
25
8
public static class Solution1 {
You can’t perform that action at this time.
0 commit comments