문제 출처: https://leetcode.com/problems/height-checker/
func heightChecker(_ heights: [Int]) -> Int {
var sorted = heights.sorted(by: <)
var count = 0
for i in 0..<sorted.count {
if heights[i] != sorted[i] {
count += 1
} else {
}
}
return count
}