<prompt> Kutekeleza algorithm ya haraka-sort ili kuorodhesha safu fulani.4, 3, 5, 9, 1  <response>: Quick-sort is a divide-and-conquer sorting algorithm that 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. Then, the sub-arrays are sorted recursively. Here is an implementation in python:pythondef quick_sortarr: if lenarr 1: return arr else: pivot arr0 less x for x in arr1: if x pivot greater x for x in arr1: if x pivot return quick_sortless pivot quick_sortgreater Driver code arr 4, 3, 5, 9, 1printOriginal array:, arrarr quick_sortarrprintSorted array:, arrThis code will create the following output:Original array: 4, 3, 5, 9, 1Sorted array: 1, 3, 4, 5, 9This implementation chooses the first element of the array as the pivot, but different strategies can be used, such as choosing a random element, the median or even the middle element. The choice of pivot can impact the algorithms performance. 