Share a website with code highlighting~

https://highlightcode.com/

 Paste the code into the panel

def Quick_Sort(myList,start,end):
#myList表示输入序列
#start表示起始位置
#end表示终止位置
    if start < end:
        i,j = start,end
        pivot = myList[i]#枢轴位置
        while i < j:
            while (i < j) and (myList[j] >= pivot):
                j = j - 1
            myList[i] = myList[j]
            while (i < j) and (myList[i] <= pivot):
                i = i + 1
            myList[j] = myList[i]
        myList[i] = pivot
        Quick_Sort(myList, start, i - 1)#递归排序枢轴左侧序列
        Quick_Sort(myList, j + 1, end)#递归排序枢轴右侧序列
    return myList

 This will be automatically generated! ! ~ can be placed in the appendix of the paper

Guess you like

Origin blog.csdn.net/higerwy/article/details/129357821