Basic data structure
I omitted some things directly jumped into the basic data structure. The main reason is some principles of algorithm analysis, tell us how to effectively evaluate complexity of a program and the equation that provides some formulas used to do this from mathematical perspective. The main reason for these things jumped is that I have nothing to breathe:). These things are not careful to tell people to teeth, they don't want to be cruel to themselves, not fat, do not fat, do not fat. OK, then we start the data structure. Today we have been reviewing several structures that are already familiar with: the most underlying structure, arrays, linked lists, strings. The most underlying structure: integer, floating point, character. Take it in your hand every day, don't you say it? Let's write a structure as a graduation mark: typedef struct points {float x; float y;} POINT;
A function of calculating a point distance: float distance (Point A, Point B) {float dx = a.x-B.x; float dy = a.y-b.y; return SQRT (DX * DX-DY * DY);}
Array: The array is basically in its underlying characteristics, each array access can be implemented using limited machine code. It has a direct correspondence with memory. (You can't go online this evening, you should go to Google to view the relevant literature) also give a program: Erradorse screen Sieve of ERATOSTHENSE: This function is based on an array a [i], if i is the number of ps, I] = 1, otherwise A [i] = 0, first initialization to 1 means that there is no known "non-known number. Then set the array element corresponding to the index of the non-quantity index to 0, and if all the multiple of the minor prime numbers are set to 0, A [i] is still 1 to determine whether it is the number of pins. #define n 10000mAin () {INT I, J, A [N]; for (i = 2; i