You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p>Students are asked to stand in non-decreasing order of heights for an annual photo.</p>
<p>Return the minimum number of students not standing in the right positions. (This is the number of students that must move in order for all students to be standing in non-decreasing order of height.)</p>
<p> </p>
<p><strong>Example 1:</strong></p>
<pre>
<strong>Input: </strong>[1,1,4,2,1,3]
<strong>Output: </strong>3
<strong>Explanation: </strong>
Students with heights 4, 3 and the last 1 are not standing in the right positions.