zitterkoph
zitterkoph
19.11.2019 • 
Mathematics

You are given an array a representing heights of students. all the students are asked to stand in rows. the students arrive by one, sequentially (as their heights appear in a). for the i-th student, if there is a row in which all the students are taller than a[i], the student will stand in one of such rows. if there is no such row, the student will create a new row. your task is to find the minimum number of rows created. test cases

Solved
Show answers

Ask an AI advisor a question