算法导论(第三版)参考答案:练习1.1-1,练习1.1-2,练习1.1-3,练习1.1-4,练习1.1-5
Exercise 1.1-1
Give a real-world example that requires sorting or a real-world example that requires computing a convex hull.
排队问题:小学体育课上,老师要求我们由低到高站成一列。
防线修建:在经费有限的情况下,尽可能多的包含自己的城市。
Exercise 1.1-2
Other than speed, what other measures of efficiency might one use in a real-world setting?
资源利用率、内存占用情况。
Exercise 1.1-3
Select a data structure that you have seen previously, and discuss its strengths and limitations.
链表
优势:可变长度、不需要连续内存空间。
局限:查询某元素,需要遍历链表、需要多余的空间存放指针。
Exercise 1.1-4
How are the shortest-path and traveling-salesman problems given above similar? How are they different?
相似之处在于都是在寻找最短路径。<