• <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)  編輯 收藏 引用 所屬分類: 算法與數據結構
            …久久精品99久久香蕉国产| 国产成人综合久久精品红| 久久人人爽人人爽人人AV东京热| 精品无码久久久久久国产| 国内精品久久久久久久涩爱 | 精品精品国产自在久久高清| 一本久久久久久久| 国产A三级久久精品| 中文字幕成人精品久久不卡| 狠狠色婷婷久久一区二区| 久久免费高清视频| 久久国产精品77777| 久久精品视频一| 日韩久久无码免费毛片软件| 久久婷婷五月综合97色| 成人综合久久精品色婷婷| 久久精品国产亚洲7777| 99久久精品免费| 久久久久免费精品国产| 婷婷久久久亚洲欧洲日产国码AV| 久久久久久久精品妇女99| 久久av免费天堂小草播放| 伊人久久免费视频| 久久一区二区三区免费| 久久亚洲av无码精品浪潮| 狠狠色丁香婷婷综合久久来来去| 国产精品天天影视久久综合网| 国内精品久久人妻互换| 国产婷婷成人久久Av免费高清| 久久人人爽人人爽人人爽| 久久国产精品久久| 亚州日韩精品专区久久久| 国产91久久精品一区二区| 久久亚洲国产成人精品无码区| 久久九九兔免费精品6| 精品午夜久久福利大片| 久久人人爽人人爽人人片AV东京热 | 亚洲AV无码久久| 久久国产影院| 亚洲国产精品人久久| 久久久一本精品99久久精品88|