• <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 閱讀(230) 評論(0)  編輯 收藏 引用 所屬分類: 算法與數據結構
            久久夜色精品国产| 久久亚洲日韩看片无码| 久久国产精品久久| 九九久久精品国产| 久久亚洲精品中文字幕| 久久精品无码免费不卡| 亚洲日韩中文无码久久| 久久精品国产精品亜洲毛片| 伊人久久国产免费观看视频| 91久久精品91久久性色| 婷婷伊人久久大香线蕉AV| 久久久精品人妻无码专区不卡 | 中文字幕亚洲综合久久菠萝蜜| 久久久久亚洲精品无码蜜桃| 久久婷婷色香五月综合激情| 伊人久久免费视频| 久久久受www免费人成| 久久久久久亚洲精品无码| 久久国产成人精品麻豆| 久久线看观看精品香蕉国产| 久久成人精品视频| 亚洲精品国产成人99久久| 精品国产乱码久久久久久郑州公司 | 合区精品久久久中文字幕一区| 2021精品国产综合久久| 久久国产精品久久精品国产| 国产成人久久777777| 亚洲色大成网站www久久九| 91久久精品电影| 狼狼综合久久久久综合网| 国产精品久久精品| 色欲久久久天天天综合网| 亚洲狠狠久久综合一区77777| 久久精品一本到99热免费| 91精品日韩人妻无码久久不卡 | 99国内精品久久久久久久| 欧美一区二区三区久久综合 | 亚洲精品NV久久久久久久久久| 国产成人久久精品区一区二区| 午夜精品久久久久9999高清| 久久青青草原精品国产|