         
         while j > 0 && target < arr[j - 1] {
             swap(&arr[j], &arr[j - 1])
-            j--
+            j -= 1
         }
         arr[j] = target
     }

        var child = root * 2 + 1
        
        if child + 1 <= end && arr[child] < arr[child + 1] {
            child++
        }
        
        if arr[root] < arr[child] {

    while end > 0 {
        swap(&arr[end], &arr[0])
        siftDown(&arr, 0, end - 1)
        end -= 1
    }
    
    return arr;
