Data Structure Review 1

Source: Internet
Author: User
Tags table definition

1, the sequential storage structure of linear table is a (random access storage structure);

2, a generalized table can be shared by other generalized tables;

3, the stack has the memory function. Can be used to explore the situation of the Web page, browse the first page a, and then from page A into page B, and then enter C, and then press back, can return B and a, which indicates that browsing the web has memory function, the principle of the stack is similar;

4. Array insertion and deletion requires an average moving array length of N/2; the hash table is difficult to traverse sequentially; the insertion and deletion of a queue in the queue is inefficient in the specific element;

5, compared with the sequential stack, the chain stack usually does not appear full of the situation;

6. Generalized table

(1) The generalized table can be empty;

(2) Generalized table definition: is a finite sequence of n (n≥0) element A1,a2,...,ai,...,an.

which
①ai--is either an atom or a generalized table.
② generalized tables are usually written as:
Ls= (A1,a2,...,ai,...,an).
③ls is the name of the generalized table, and N is its length .
④ If the AI is a generalized table, it is called the sub-table of LS.
Attention:
① generalized tables are usually enclosed in parentheses, separating the elements with commas.
② in order to distinguish between atoms and generalized tables, write with uppercase letters representing generalized tables , with lowercase letters representing atoms .
③ if the generalized table LS is non-null (n≥1), then Al is the table header of LS, and the remaining elements of the table (A1,a2,...,an) are called the footer of LS.
④ generalized tables are recursively defined.

(3) l= (A, B) and b= (a,y) = ((x, (b)), where the L depth is 1,b depth of 3; Operation: Head (L) =a, tail (l) = (b);Head (b) =a, tail (b) = (y);

7, character array length problem:

Char acx[]= "ABCDEFG";
Char acy[]={' A ', ' B ', ' C ', ' d ', ' e ', ' f ', ' G '};

The ACX length is 8, and the string is followed by a closing identifier ' acy ', and the length is 7;

8, a 5*4 matrix, has () a rectangle;

Note that the matrix that is said here should actually be subscript for the array. Long any take two points C (6,2) * Wide any take two points C (5,2) = 15* 10 = 150.

Data Structure Review 1

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.