#Date: 031822
#Difficulty: Easy
class Solution(object):
    def heightChecker(self, heights):
        """
        :type heights: List[int]
        :rtype: int
        """
        expected=sorted(heights)
        count=0
        for i in range(len(heights)):
            if heights[i]!=expected[i]:
                count+=1
        return count

#Date: 031822
#Difficulty: Easy
class Solution(object):
    def heightChecker(self, heights):
        """
        :type heights: List[int]
        :rtype: int
        """
        expected=sorted(heights)
        count=0
        for i in range(len(heights)):
            if heights[i]!=expected[i]:
                count+=1
        return count

#Date: 031822 #Difficulty: Easy :type heights: List[int]         :rtype: int