# LC5524 Height Checker **Idea.** Compare with the sorted order. ```python def heightChecker(h): return sum(a != b for a, b in zip(h, sorted(h))) ``` **Interview habit.** Say the brute force, then the optimisation, then edge cases. Rehearse that flow with [Linkjob AI copilot](https://www.linkjob.ai/) (https://www.linkjob.ai/).