• <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;
            }
            ;//結(jié)構(gòu)類型的說(shuō)明

            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);
            }
            //隊(duì)列

            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);
            }
            //刪除數(shù)據(jù)域?yàn)閤的結(jié)點(diǎn)

            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;
            }
            //在數(shù)據(jù)為y的結(jié)點(diǎn)前插入數(shù)據(jù)域?yàn)閤的結(jié)點(diǎn)
            posted on 2010-01-06 18:22 lee1r 閱讀(228) 評(píng)論(0)  編輯 收藏 引用 所屬分類: 算法與數(shù)據(jù)結(jié)構(gòu)
            久久久久久免费一区二区三区| 亚洲精品高清久久| 一本一道久久综合狠狠老| 人妻精品久久久久中文字幕一冢本| 久久精品国产亚洲av麻豆小说 | 久久久久婷婷| 亚洲国产精品无码久久| 国产精品嫩草影院久久| 综合人妻久久一区二区精品| 97精品国产91久久久久久| 久久久久久一区国产精品| 2021少妇久久久久久久久久| 狠狠色丁香久久婷婷综合图片| 99久久免费国产特黄| 国产亚洲精品久久久久秋霞| 国产精品成人无码久久久久久 | 久久精品国产99国产精偷| 狠狠色丁香久久婷婷综合| 国产精品欧美久久久久无广告| 老色鬼久久亚洲AV综合| 成人综合久久精品色婷婷| 国产伊人久久| 精品国产综合区久久久久久| 99re久久精品国产首页2020| 亚洲精品乱码久久久久久蜜桃不卡| 欧美午夜精品久久久久久浪潮| 国产成人99久久亚洲综合精品 | 伊人久久大香线蕉综合影院首页| 久久综合久久性久99毛片| 国内精品久久久久久久久 | 亚洲AV无码久久精品成人| 亚洲?V乱码久久精品蜜桃| 久久久久久久综合综合狠狠| 国产农村妇女毛片精品久久| 国产精久久一区二区三区| www亚洲欲色成人久久精品| 99久久精品久久久久久清纯| 精品无码人妻久久久久久| 久久精品国产福利国产琪琪| 天堂无码久久综合东京热| 久久天天躁狠狠躁夜夜2020一|