上一页 1 ··· 53 54 55 56 57 58 59 60 61 ··· 345 下一页
摘要: python 快速排序 a=[5,4,2,3,1]print(a)n=len(a)l=0r=n-1while True: if a[l]>a[r]: a[l],a[r]=a[r],a[l] r=r-1 i... 阅读全文
posted @ 2022-08-19 22:57 luoganttcc 阅读(5) 评论(0) 推荐(0)
摘要: python 快速排序 a=[5,4,2,3,1]print(a)n=len(a)l=0r=n-1while True: if a[l]>a[r]: a[l],a[r]=a[r],a[l] r=r-1 i... 阅读全文
posted @ 2022-08-19 22:57 luoganttcc 阅读(4) 评论(0) 推荐(0)
摘要: import randomdef fast_sort(a): n=len(a) l=0 r=n-1 ... 阅读全文
posted @ 2022-08-19 22:57 luoganttcc 阅读(9) 评论(0) 推荐(0)
摘要: import randomdef fast_sort(a): n=len(a) l=0 r=n-1 ... 阅读全文
posted @ 2022-08-19 22:57 luoganttcc 阅读(10) 评论(0) 推荐(0)
摘要: python 堆排序的两种实现 import heapq#-*- coding: UTF-8 -*-import numpy as npdef MakeHeap(a): for i in range(int(a.size / 2)... 阅读全文
posted @ 2022-08-19 22:57 luoganttcc 阅读(10) 评论(0) 推荐(0)
摘要: python 堆排序的两种实现 import heapq#-*- coding: UTF-8 -*-import numpy as npdef MakeHeap(a): for i in range(int(a.size / 2)... 阅读全文
posted @ 2022-08-19 22:57 luoganttcc 阅读(16) 评论(0) 推荐(0)
摘要: import heapq#-*- coding: UTF-8 -*-import numpy as npdef MakeHeap(a... 阅读全文
posted @ 2022-08-19 22:57 luoganttcc 阅读(9) 评论(0) 推荐(0)
摘要: import heapq#-*- coding: UTF-8 -*-import numpy as npdef MakeHeap(a... 阅读全文
posted @ 2022-08-19 22:57 luoganttcc 阅读(15) 评论(0) 推荐(0)
摘要: python 栈实现 #!/usr/bin/env python3# -*- coding: utf-8 -*-"""Created on Tue Jun 26 22:32:27 2018@author: luogan"""class ... 阅读全文
posted @ 2022-08-19 22:57 luoganttcc 阅读(4) 评论(0) 推荐(0)
摘要: python 栈实现 #!/usr/bin/env python3# -*- coding: utf-8 -*-"""Created on Tue Jun 26 22:32:27 2018@author: luogan"""class ... 阅读全文
posted @ 2022-08-19 22:57 luoganttcc 阅读(11) 评论(0) 推荐(0)
上一页 1 ··· 53 54 55 56 57 58 59 60 61 ··· 345 下一页