Problem 1051 · Easy

Height Checker

Count the positions in a lineup whose height differs from the same heights sorted in order. The original and sorted rows are compared position by position.

Open the interactive visualisation