Princeton Algorithms: Part 1 [week 2:Elementary Sorts]
来源:互联网 发布:如何做好淘宝店推广 编辑:程序博客网 时间:2024/05/17 01:36
Exercises
Explanation:
The correct answer is: 17 34 50 51 81 94 98 80 78 96
Here is the array after each exchange:
94 98 96 50 81 17 34 80 78 51
1: 17 98 96 50 81 94 34 80 78 51
2: 17 34 96 50 81 94 98 80 78 51
3: 17 34 50 96 81 94 98 80 78 51
4: 17 34 50 51 81 94 98 80 78 96
Explanation:
The correct answer is: 0 3 2 1 2 3 1 4
0: Original input
3: Shellsort after 4-sorting
2: Selection sort after 8 iterations
1: Insertion sort after 8 iterations
2: Selection sort after 7 iterations
3: Shellsort after 13-sorting
1: Insertion sort after 5 iterations
4: Sorted
Job Interview Questions
0 0
- Princeton Algorithms: Part 1 [week 2:Elementary Sorts]
- Princeton Algorithms: Part 2 [week 3: Radix Sorts]
- Algorithms - Week 2-1 Elementary Sorts
- Internal Sorting Algorithms Part 1/2: Elementary Sorts
- Princeton Algorithms: Part 1 [week 2:Stacks and Queues]
- Princeton Algorithms: Part 2 [week 1: Undirected Graphs]
- Princeton Algorithms: Part 2 [week 1: Directed Graphs]
- Princeton Algorithms: Part 2 [week 5: Tries]
- Princeton Algorithms: Part 2 [week 7: Reductions]
- Princeton Algorithms: Part 2 [week 7: Intractability]
- Princeton Algorithms: Part 1 [week 3:Mergesort]
- Princeton Algorithms: Part 1 [week 3: Quicksort]
- Princeton Algorithms: Part 1 [week 1:Analysis of Algorithms]
- Princeton Algorithms: Part 2 [week 7: Final Exam Part II]
- Princeton Algorithms: Part 2 [week 2: Minimum Spanning Trees]
- Princeton Algorithms: Part 2 [week 2: Shortest Paths]
- Princeton Algorithms: Part 1 [week 1:Union Find]
- Princeton Algorithms: Part 2 [week 3: Maxflow and Mincut]
- 图像形态学操作—腐蚀膨胀深入
- 使用记事本开发JAVA(HelloWorld)
- MobaXterm这个工具很好用
- 启用oracle 11g自动收集统计信息
- Apache Lucene
- Princeton Algorithms: Part 1 [week 2:Elementary Sorts]
- Android为何总是无法正常访问Tomcat服务器
- minhash算法
- Windows如何打包Qt程序
- 个人yum理解,本地yum源添加及推荐一个神奇的网站
- c语言全局变量和局部变量问题汇总
- 运用JS设置cookie、读取cookie、删除cookie
- 史上最全: svn与git的对比(二):svn与git的相关概念
- 理解一般指针和指向指针的指针