Leetcode 1051. Height Checker | | Leetcode 1051. Height Checker 文章作者:Tyan博客:noahsnail.com | CSDN | 简书 1. Description 2. Solution Version 1 12345678class Solution: def heightChecker(self, heights): count = 0 result = sorted(heights) for i in range(len(heights)): if heights[i] != result[i]: count += 1 return count Reference https://leetcode.com/problems/height-checker/ 如果有收获,可以请我喝杯咖啡! 赏 微信打赏 支付宝打赏