Given a randomized array with these contents:   23 18 34 13…

Given a randomized array with these contents:   23 18 34 13 21 28 40 15 39 30 perform a top-level quicksort partition using the algorithm we used in class, and write the contents of the resulting array below.  Write your answer with one space between numbers.

Which of the following diagrams shows the result from insert…

Which of the following diagrams shows the result from inserting the following keys into a separate chaining hash table (with M=5)?  (Use the key value mod M as the hash function.)   27 82 41 124 63 31 In each diagram the hash table is on the left with index 0 at the top, and the chains of keys hashing to each index are to the right.

What is the order of growth of this function? int alg1(int[]…

What is the order of growth of this function? int alg1(int[] a) {     int count = 0;     for (int i = 0; i < a.length; i++)         for (int j = i+1; j < a.length; j++)             if (a[i] == a[j])                 count += 1;     return sum; }