Data structure + algorithm = Program
Logical Structure: Set, linear, tree, graph
Physical Structure:sequential, chain-
Algorithm Analysis:
- (progressive) complexity of time :
number of executions of the base statement(Basic statement: A statement that is proportional to the number of execution times of the entire algorithm, usually the loop body of the most inner loop)
- non-recursive : find the most frequently executed basic statement into the large O;
- recursion : (iterative method) The right side of the expanded equation can be iterated, until there are no items to iterate, then the solution of the equation is estimated by estimating the right and http://www.cnblogs.com/ Python27/archive/2011/12/09/2282486.html
Best case, worst case, average case (probability) common time complexity:
- (progressive) spatial complexity :
When the algorithm executesTemporaryOpen up the auxiliary space (about the complexity of time and space aSome points of note for ACM:
Important fact: the contemporary computer 1s can do 10^7 around the calculation;the machine can be configured to k*10^7~10^8. Under this limitation, there is a limit to the size of the time-complexity algorithm that can be processed:
The maximum space limit of contemporary 32-bit PC is generally 10^7BYTE≈10MB, for example, you can open several integer arrays of size 10^6: int a[10^6]; Open larger arrays, such as a[10^7] will generally encounter memory Limit exceed; Even if no memory is limited by the number of previous operations, the time complexity is not good: spatial complexity (two common spatial overflow errors): 1, Stack Overflow (recursive program):recursive procedures are common;In most cases you don't have to worry about stack overflow issues2. Open a large array in the function:solution opens into a global array
From for notes (Wiz)
Introduction to data structure and algorithm analysis