<prompt> Kuandika algorithm ya kuandaa safu ya idadi unordered.  <response>: To sort an array of unordered numbers, one of many algorithms that can be used is the quicksort algorithm. Here is an implementation of quicksort in Python:def quicksortarray: if lenarray 2: Base case: arrays with 0 or 1 element are already sorted return array else: Recursive case pivot array0 Sub-array of all the elements less than the pivot less i for i in array1: if i pivot Sub-array of all the elements greater than the pivot greater i for i in array1: if i pivot return quicksortless pivot quicksortgreaterThe quicksort function takes as input an array of unordered numbers. The function has a base case, which is to return the array if it is of length less than 2 since arrays with 0 or 1 element are already sorted. For arrays of length 2 or more, the function proceeds with the recursive case.In the recursive case, the first element of the array is selected as the pivot. Two sub-arrays are then created: one less sub-array containing all the elements less than or equal to the pivot and a greater sub-array containing all the elements greater than the pivot. The quicksort function is then called recursively on both the less and the greater sub-arrays.Finally, the sorted less sub-array, the pivot, and the sorted greater sub-array are concatenated together to form the sorted array, which is then returned as the output.Note that the quicksort algorithm is an efficient sorting algorithm that has an average-case time complexity of On log n, where n is the number of elements in the array. In the worst case, the time complexity is On2, but this is unlikely to happen if the pivot is chosen properly. 