File tree Expand file tree Collapse file tree 1 file changed +0
-18
lines changed
src/main/java/com/fishercoder/solutions Expand file tree Collapse file tree 1 file changed +0
-18
lines changed Original file line number Diff line number Diff line change 2
2
3
3
import java .util .Arrays ;
4
4
5
- /**
6
- * 1051. Height Checker
7
- *
8
- * Students are asked to stand in non-decreasing order of heights for an annual photo.
9
- * Return the minimum number of students not standing in the right positions.
10
- * (This is the number of students that must move in order for all students to be standing in non-decreasing order of height.)
11
- *
12
- * Example 1:
13
- * Input: [1,1,4,2,1,3]
14
- * Output: 3
15
- * Explanation:
16
- * Students with heights 4, 3 and the last 1 are not standing in the right positions.
17
- *
18
- * Note:
19
- *
20
- * 1 <= heights.length <= 100
21
- * 1 <= heights[i] <= 100
22
- * */
23
5
public class _1051 {
24
6
public static class Solution1 {
25
7
public int heightChecker (int [] heights ) {
You can’t perform that action at this time.
0 commit comments