Skip to content

algorithm 算法时间复杂度比较

Notifications You must be signed in to change notification settings

DeSireFire/algorithm

 
 

Repository files navigation

algorithm

这几天经常被问到列表排序算法的问题,在此总结了常用算法,并进行简单测试,测试内容:不同算法对一个10万条数据的list进行排序,统计运行时间
包含插入排序,冒泡排序,选择排序,快速排序,归并法,堆排序和,sorted方法排序
对比结果发现,sorted是最快的,再也不用为寻找哪种算法最优发愁了,python內建的就是最好的


最后的冒泡排序已经运行不完了
image

连续子数组使其最大.py 动态规划算法思想

About

algorithm 算法时间复杂度比较

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%