__director

选择排序

def selectsort(arg):
    for i in range(len(arg)-1):
        middle = i
        for y in range(i+1,len(arg)):
            if arg[middle]  >  arg[y]:
                middle = y
        arg[i],arg[middle] = arg[middle],arg[i]
    return arg

 

posted on 2020-04-24 21:28  __director  阅读(74)  评论(0编辑  收藏  举报

导航