<prompt> 2, 4, 3, 7, 5Tumia algorithm ya haraka-sort ili kuorodhesha safu ifuatayo.  <response>: Quick sort is a popular sorting algorithm that uses the divide-and-conquer approach. It works by selecting a pivot element from the array and partitioning the other elements into two sub-arrays, according to whether they are less than or greater than the pivot element. The function then recursively repeats the partitioning step on the two sub-arrays until the base case is reached an empty array or an array with only one element, which is already sorted.Here is one way you could implement the quick-sort algorithm in Python:pythondef quick_sortnumbers: if lennumbers 1: return numbers Base case: An empty array or an array with one element is already sorted pivot numbers.poplennumbers 2 Choose a pivot element and remove it from the list items_greater items_lower for item in numbers: if item pivot: items_greater.appenditem else: items_lower.appenditem return quick_sortitems_lower pivot quick_sortitems_greaternumbers 2, 4, 3, 7, 5sorted_numbers quick_sortnumbersprintsorted_numbersOutput:python2, 3, 4, 5, 7This implementation chooses the pivot element as the middle element of the array, partitions the array into two sub-arrays of elements less than and greater than the pivot element, and then concatenates the results of recursively sorting the two sub-arrays along with the pivot element to obtain the final sorted array. 