<prompt> Kupata n-th ndogo kipengele katika safu katika C . Kufanya hivyo bila kutumia aina au kumbukumbu ya ziada.  <response>: One way to find the n-th smallest element in an array without using sort or extra memory is to use the Quickselect algorithm. Heres an outline of how the algorithm works:1. Choose a pivot element from the array e.g., the first element.2. Partition the array around the pivot: - Move all elements smaller than the pivot to the left of the pivot. - Move all elements larger than the pivot to the right of the pivot.3. If the pivot index is the n-th smallest element, were done.4. If the pivot index is less than n, repeat the process on the right subarray.5. If the pivot index is greater than n, repeat the process on the left subarray.Here is the C code for Quickselect: Returns the n-th smallest element in arrl..rint quickselectint arr, int l, int r, int n if l r return arrl; Choose the first element as pivot int pivot arrl; int i l 1; index for elements smaller than pivot int j r; index for elements larger than pivot Partition the array around the pivot while i j if arri pivot i; else if arrj pivot j--; else std::swaparri, arrj; Place the pivot in its final position std::swaparrl, arrj; Check if pivot is the n-th smallest element if j n-1 return arrj; else if j n-1 Repeat on the right subarray return quickselectarr, j1, r, n; else Repeat on the left subarray return quickselectarr, l, j-1, n; Sample usageint arr 5, 2, 9, 1, 7;int n 3; find the 3rd smallest elementint result quickselectarr, 0, 4, n;std::cout The n -th smallest element is: result std::endl; 