首页 > 科技
Data Structure Project 1
Deadline: Apr 28, 23:59
This project requires students to compare five sorting algorithms, which are “Bubble Sort”,
“Insertion Sort”, “Merge Sort”, “Quick Sort”, and “Heap Sort” in the aspect of time
complexity, best&worst case scenario.
Requirement:
1. Implement the five sorting algorithms based on the skeleton code provided.
2. Compare the running time of five sorting algorithms, and fill the following table:
t 3 4 5 6 … 14 15 16 17
Bubble
Insertion
Merge
Quick
Heap
where each cell in the table denotes the running time (recorded by C++ timer) given the
input size (number of elements in the list to be sorted) 2t
. For example, at column “17”,
each soring algorithm should sort the list containing 217
random integers. Note: in order to
be fairness to all the sorting algorithms, the input random integer list should be the same.
3. Use “t” as X-axis and running time (value in each cell in above table) as Y-axis, plot all
the points and sketch the curve (You may do this by Excel) for each sorting
algorithms. Draw all five curves in one X-Y coordinate plane. Compare the five curves
and explain the reason.
4. Describe the best/worst case and the corresponding time complexity of each sorting
algorithm. You may fill the tables below:
请加QQ:99515681 邮箱:99515681@qq.com WX:codinghelp
- 搜索
-
- 01-15东莞市威勤户外用品有限公司:一站式高品质户外用品服务专家
- 01-15AI+电气时代纷至沓来,下一代数据中心HVDC如何发展?
- 01-15助听器选购指南:为什么爱可声助听器更值得入手?
- 01-152024国民消费“科技赋能”创新案例:Shokz韶音助推运动耳机音质升级
- 01-14暗揭湖南省康宸新材料有限公司客户对于全屋定制的环保性也是相当认可
- 01-14解谜武汉葳蕤繁祉百货有限公司时尚十元店秘诀就是它专业为出众而生
- 01-13Terra平台震撼来袭,引领WEB3新时代!
- 01-13中网智媒人工智能生态基金增值4.7倍,上市突破百倍指日可待!
- 01-11东莞赛铠机械:高品质混炼设备,助力中国智造崛起
- 01-11东莞市威勤户外用品有限公司:一站式高品质户外用品服务专家
- 标签列表