Series Address: Introduction to Algorithms (CLRS) reference answers and matching programming questions
1.1 Algorithm
1.1-1 such as undergraduate semester statistics sorting to assign scholarships and so on.
1.1-2 such as the memory needed to solve the problem, and so on.
1.1-3 Sequential table, the advantage of support random lookup, you can find elements in \ (O (1) \) , the disadvantage is to add/remove elements inconvenient.
1.1-4 Similarity: All can be simulated by a graph with weighted edges to solve the total distance minimization problem.
Different: The shortest path and the travel quotient problem consider different vertex situations, resulting in different complexity.
1.1-5 only the best solution: Use the same appearance key to unlock, only the correct key can be opened.
Getting an approximate solution is also OK: the route that you take when you drive is not necessarily a straight line, but also a round.
1.2 As a technique of algorithm
1.2-1 E-Commerce Advertising recommendation system, select the most likely by the user click on the ads to recommend.
The 1.2-2 problem translates into a value that we need to determine so that $8n^2<64 n \log _2 (n) $ is established, simplifying to $ n<8 \log _2 (n) $ or $n \leq 43 $, that is, when the sort size does not exceed 43 elements, insert rows The order is better than the merge sort.
Introduction to the 1th chapter of algorithms and the choice of programming questions