Examine the procedure DOES SOMETHING below and provide answer to the following given questions.
a) Specify the function of procedure DOES SOMETHING?
b) What is the time complexity of the procedure?
c) If A[l .. r] = [24, 30, 09, 46, 15, 19, 29, 86,78], specify the output? Procedure does something (A,l,r) Input: Array A(l .. r) 1. x ← A[l]; i ← l; j ←r; 2) however i < j do 3) while A[i] ≤ x and i ≤ r do i ← i +1; 4) while A[j] > x and j ≥ l do j ← j -1; 5) if i< j then 6) exchange A[i] ↔ A[j]; 7) q ← j; 8) exchange A[l] ↔ A[q];