3616. Number of Student Replacements
You are given an integer array
rankswhereranks[i]represents the rank of theithstudent arriving in order. A lower number indicates a better rank.Initially, the first student is selected by default.
A replacement occurs when a student with a strictly better rank arrives and replaces the current selection.
Return the total number of replacements made.
1 | class Solution { |