• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            心如止水
            Je n'ai pas le temps
            posts - 400,comments - 130,trackbacks - 0
            #include<stdio.h>
            #include
            <stdlib.h>
            struct node
            {
                   
            int data;
                   
            struct node *next;
            }
            ;//結構類型的說明

            struct node *stack(struct node *head)
            {
                 
            int i;
                 
            struct node *p;
                 p 
            = (struct node*)malloc(sizeof(struct node));
                 p
            ->next = NULL;
                 
            for(i=0;i<10;i++)
                   
            {
                     head 
            = (struct node*)malloc(sizeof(struct node));
                     p
            ->data = i;
                     head
            ->next = p;
                     p 
            = head;;
                   }

                 
            return (head);
            }
            //

            struct node *team(struct node *head)
            {
                 
            int i;
                 
            struct node *tail,*p;
                 head 
            = (struct node*)malloc(sizeof(struct node));
                 tail 
            = head;
                 
            for(i=0;i<10;i++)
                   
            {
                     p 
            = (struct node*)malloc(sizeof(struct node));
                     p
            ->data = i;
                     tail
            ->next = p;
                     tail 
            = p;
                   }

                 tail
            ->next = NULL;
                 
            return (head);
            }
            //隊列

            void print_list(struct node *head)
            {
                 
            struct node *p;
                 p 
            = head->next;
                 printf(
            "Begin");
                 
            while(p != NULL)
                   
            {
                     printf(
            "->%d",p->data);
                     p 
            = p->next;
                   }

                 printf(
            "->End\n");
            }
            //鏈表輸出

            void detele_x(struct node *head,int x)
            {
                 
            struct node *p,*q;
                 p 
            = head;
                 q 
            = head->next;
                 
            while(q->data != x && q->next != NULL)
                   
            { p = q; q = q->next; }
                 
            if(q->data == x)
                   p
            ->next = q->next;
                 free(q);
            }
            //刪除數據域為x的結點

            void add_x_y(struct node *head,int x,int y)
            {
                 
            struct node *add_new,*p,*q;
                 add_new 
            = (struct node*)malloc(sizeof(struct node));
                 add_new
            ->data = x;
                 p 
            = head;
                 q 
            = head->next;
                 
            while(q != NULL && q->data != y)
                   
            { p = q; q = q->next; }
                 p
            ->next = add_new;
                 add_new
            ->next = q;
            }
            //在數據為y的結點前插入數據域為x的結點
            posted on 2010-01-06 18:22 lee1r 閱讀(227) 評論(0)  編輯 收藏 引用 所屬分類: 算法與數據結構
            久久99国产综合精品| 久久99国产精品99久久| 精品久久久久一区二区三区| 亚洲一本综合久久| 久久久久国产日韩精品网站| 思思久久好好热精品国产| 国产精品久久久久蜜芽| 精品久久久久中文字幕日本| 99久久国产综合精品五月天喷水| 精品久久久久久国产三级| 久久精品国产亚洲av麻豆蜜芽| 久久久一本精品99久久精品88| 国产精品成人99久久久久| 一个色综合久久| 97热久久免费频精品99| 性做久久久久久久久浪潮| 国内精品伊人久久久久| 思思久久99热只有频精品66| 草草久久久无码国产专区| 一本久久a久久精品vr综合| 狠狠色综合网站久久久久久久| 国内精品久久久久久久久电影网| 一本久久a久久精品综合夜夜| 99久久无色码中文字幕人妻| 国产成人精品综合久久久| 日产精品99久久久久久| 一本久久综合亚洲鲁鲁五月天| 久久最新精品国产| 精品久久久久香蕉网| 久久久噜噜噜www成人网| 最新久久免费视频| 久久97久久97精品免视看秋霞| 久久综合综合久久97色| 情人伊人久久综合亚洲| 欧美一区二区精品久久| 久久久久综合网久久| 久久久久久国产精品免费无码 | 欧美激情精品久久久久久久| 精品久久久久久中文字幕| 粉嫩小泬无遮挡久久久久久| 亚洲国产欧洲综合997久久|