def test(): # 有序 # arr = generateNearlyOrderedArray(10,0) # 无序 arr = generateNearlyOrderedArray(10, 3) flag = isSortedArray(arr) print(flag)
def test(): arr = generateNearlyOrderedArray(10, 10) print(arr) alist = quickSort(arr, 0, 9) print("------------------------------------------") print(alist)
def test(): arr = generateNearlyOrderedArray(10, 10) print(arr) alist = shellSort1(arr) print("------------------------------------------") print(alist)
def test(): arr = generateNearlyOrderedArray(10, 10) print(arr) alist = heapSort(arr, 10) print("------------------------------------------") print(alist)
def test(): arr = generateNearlyOrderedArray(10, 10) print(arr) alist = selectionSort(arr) print("------------------------------------------") print(alist)