• <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)  編輯 收藏 引用 所屬分類: 算法與數據結構
            久久er国产精品免费观看8| 久久久久99精品成人片欧美| 手机看片久久高清国产日韩| 久久精品国产亚洲AV影院| 精品久久一区二区三区| 久久久久无码精品国产app| 无码人妻久久久一区二区三区| 久久影院综合精品| 亚洲精品乱码久久久久久蜜桃| 久久水蜜桃亚洲av无码精品麻豆| 国产99久久九九精品无码| 久久久久久久精品妇女99| 亚洲国产精品久久久久婷婷软件| 久久人妻AV中文字幕| 国产一区二区三精品久久久无广告| 欧美熟妇另类久久久久久不卡| 久久久久亚洲AV成人网人人软件| 久久久久亚洲精品天堂| 区久久AAA片69亚洲| 久久精品二区| AAA级久久久精品无码区| 97久久精品无码一区二区| 亚洲欧美日韩久久精品第一区| 久久久91人妻无码精品蜜桃HD| 久久久精品午夜免费不卡| 伊人久久大香线蕉综合影院首页| 久久久久九国产精品| 9191精品国产免费久久| 久久亚洲国产午夜精品理论片| 麻豆AV一区二区三区久久 | 精品久久久久久久久久中文字幕| 亚洲午夜久久久久妓女影院 | 久久久WWW成人| 岛国搬运www久久| 国产精品无码久久久久| 一级做a爱片久久毛片| 国产精品成人久久久久三级午夜电影 | 亚洲精品久久久www| 三级片免费观看久久| 一本色道久久88综合日韩精品| 伊人久久大香线蕉综合热线|