12 2022 档案

摘要:def selection_sort(alist): n = len(alist) # 需要进行n-1次选择操作 a = 0 for i in range(n-1): # 记录最小位置 min_index = i exit = i # 从i+1位置到末尾选择出最小数据 for j in range( 阅读全文
posted @ 2022-12-18 12:54 ty1539 阅读(19) 评论(0) 推荐(0) 编辑
摘要:# Start with a list of numbers that ain't sorted numbers=[0,5,1,4,2,8] # Keep track of whether any swaps were made on the previous i teration # If no 阅读全文
posted @ 2022-12-10 11:57 ty1539 阅读(22) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示