(arr1)
| 46 | |
| 47 | # 插入 |
| 48 | def insert_sort(arr1): |
| 49 | temp = [arr1[0]] |
| 50 | arr1 = arr1[1:] |
| 51 | while arr1: |
| 52 | for j in range(len(temp)): |
| 53 | if temp[j] > arr1[0]: |
| 54 | temp.insert(j, arr1[0]) |
| 55 | break |
| 56 | else: |
| 57 | temp.insert(len(temp), arr1[0]) |
| 58 | arr1.pop(0) |
| 59 | return temp |
| 60 | |
| 61 | def insertSort(relist): |
| 62 | len_ = len(relist) |
nothing calls this directly
no outgoing calls
no test coverage detected