Your friend is diagnosed with bacterial pneumonia and is pre…

Your friend is diagnosed with bacterial pneumonia and is prescribed an antibiotic to treat the infection. She calls you about a week later and mentions that her pneumonia is clearing up but it seems that she has developed another infection, a vaginal yeast infection. Based on what you know, do you believe that she was predisposed to this second infection? Why or why not?

Consider the classic problem, counting inversions. Given an…

Consider the classic problem, counting inversions. Given an integer array A of size n, find the inversion count in the array. Two array elements A[i] and A[j] form an inversion if A[i] > A[j] and i < j. A sorted ascending array has 0 inversions. A sorted descending array has n(n-1)/2 inversions. Skipping the correctness and analysis sections, a solution that would be considered correct and efficient for this class would be: