• <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)  編輯 收藏 引用 所屬分類: 算法與數據結構
            精品久久久久久亚洲| 亚洲精品97久久中文字幕无码| 99久久99久久精品国产片果冻| 狠狠色综合网站久久久久久久高清| 欧美午夜精品久久久久免费视| 精品久久久久久中文字幕| 亚洲欧美另类日本久久国产真实乱对白 | 国产偷久久久精品专区| 久久本道伊人久久| 久久久久久午夜精品| 色综合久久精品中文字幕首页| 久久天天躁夜夜躁狠狠躁2022| 91久久精品国产91性色也| 亚洲国产精品成人久久| 久久久久久国产精品美女 | 97超级碰碰碰碰久久久久| 狠狠色丁香久久婷婷综合图片| 精品一区二区久久| 麻豆AV一区二区三区久久| 人妻中文久久久久| 久久精品国产精品亚洲人人 | 久久久人妻精品无码一区| 日本久久久久久中文字幕| 久久精品国产亚洲精品2020| 狠狠色婷婷久久一区二区| 亚洲精品成人网久久久久久| 精品无码久久久久久久久久 | 区亚洲欧美一级久久精品亚洲精品成人网久久久久 | 狠狠色丁香久久婷婷综合五月| 久久精品aⅴ无码中文字字幕不卡| 久久精品国产亚洲一区二区三区 | 国产三级久久久精品麻豆三级| 狠狠色丁香久久婷婷综合| 久久99国产精品久久99小说 | 亚洲国产另类久久久精品小说 | 久久精品国产91久久综合麻豆自制 | 99久久婷婷国产综合精品草原| 久久福利青草精品资源站| 2021少妇久久久久久久久久| 久久精品欧美日韩精品| 狠狠色丁香婷婷久久综合不卡|