0 thoughts on “9249371 jammin”

  1. Given an array A with n integers in it, one way of measuring the distance of the array from a sorted
    array is by counting inversions. A pair of indices i, j ∈ 0, . . . , n − 1 is called an inversion if i j and
    Ai Aj. Clearly a completely sorted array has 0 inversions. If the number of inversions is k is it possible to sort the array in θ(n + k) steps? Is there a standard sorting algorithm that can do this. Choose one out of insertion sort, selection sort,heap sort, bubble sort. HELP!!!!

Leave a Reply

Your email address will not be published.