• <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 閱讀(222) 評論(0)  編輯 收藏 引用 所屬分類: 算法與數據結構
            久久国产成人精品麻豆| 久久人人爽人人爽人人片AV不| 久久天堂AV综合合色蜜桃网| 久久久一本精品99久久精品88| 久久99国产精一区二区三区| 久久精品国产99久久久香蕉| 成人久久免费网站| 国内精品久久久久影院免费| 久久精品免费大片国产大片| 久久精品青青草原伊人| 国产一区二区精品久久岳| 久久久久亚洲av综合波多野结衣 | 国产精品一久久香蕉产线看| 2020最新久久久视精品爱| 一本久久综合亚洲鲁鲁五月天亚洲欧美一区二区 | 国产成人精品久久二区二区| 亚洲综合久久夜AV | 国产精品99精品久久免费| 久久毛片一区二区| 99久久免费国产精品| 久久精品亚洲一区二区三区浴池| 国产三级观看久久| 久久青青草原精品国产| 久久伊人中文无码| 精品无码久久久久久久久久| 国产精品无码久久久久久| 伊人久久大香线蕉AV色婷婷色| 免费精品久久久久久中文字幕| 2022年国产精品久久久久| 亚洲人成伊人成综合网久久久 | 久久99精品久久久久久| 久久久久亚洲av无码专区导航| 久久人人爽人人爽人人片AV不| 免费一级做a爰片久久毛片潮| 一级做a爰片久久毛片人呢| 99久久精品国产高清一区二区| 人妻无码αv中文字幕久久琪琪布| 7777精品伊人久久久大香线蕉| 香蕉久久久久久狠狠色| 久久免费大片| 亚洲综合久久夜AV |