Attention details of the data structure described in C language

Source: Internet
Author: User

1: Sequential tables use base addresses to represent and storeint*p; P=(int*) malloc (initsize*sizeof(int)); L ->p[x]=xx;2: The list is in addition to changing the data to change the pointer field associated with it, using the head pointer can be l->next find the node that corresponds to the I address while(p&&j<i) {P=p->Next; J++; } s=malloc.;//Assigning a new node spacep->next=s; S->next=p->Next; S->data=e;3: Stack: empty: S-Base=s->top; The stack-top pointer of a non-empty stack always points to the next position on the top of the stack, and is also stored and accessed through a base address, but insertions and deletions must be done at the top of the stack; s->top=s->Base+s.stacksize;4: Chain queue: Queue symbolizing, and each node has data fields and pointer fields; empty: QL->front=ql->Rear; Insert delete operation to change not only the node pointer and data field, but also change the team head or the end of the team;5: Two fork Tree: Each node has left and right pointer fields have data fields, recursive access, non-recursive access (sequence traversal, use of the stack, the use of the stack to pay attention to the child first into the stack, in order to go from left to right after the stack access order);

Attention details of the data structure described in C language

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.