首页 > 科技
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
- 搜索
-
- 04-10重塑企业生产力!2025金智维企业级智能体暨AI+新品发布会成功举办,引领人机协同新范式
- 04-10数坤科技:引领医疗大模型全能时代
- 04-10“惊蛰号”——全球首艘内河全航程自动驾驶试验船顺利下水
- 04-10喜报丨易智瑞公司通过上海数据交易所数商资格认证
- 04-10打造酒业全面预算管理最佳实践,企云方助力金徽酒打造“数智化”全面预算平台
- 04-09安世亚太电力设备级数字孪生与AI虚拟传感解决方案
- 04-09铼赛智能Edge mini斩获2025法国设计大奖 | 重新定义数字化齿科美学
- 04-09口腔数字化大变革,这场行业大会带你率先把握未来机遇!
- 04-082025 年 Control4 中国区客户启动会在杭州成功举办,开启高端智能家居新征程
- 04-08多模态能力的进化,是AI眼镜成为生活必需品的关键