回覆列表
  • 1 # 滴逃逃

    typedef struct _LNode

    {

    int data;

    struct _LNode *next;

    }LNode, *LinkList;

    void DelNodes(LinkList head, int i, int k)

    {

    if(i>0 && k>0)

    {

    LNode *pre = head, *start = head->next, *last;

    while((NULL != start) && (--i > 0))

    {

    pre = start;

    start = start->next;

    }

    if(NULL == start)//個數小於i

    return;

    last = start;

    while((NULL != last) && (--k > 0))

    last = last->next;

    if(NULL == last)//不足k個

    return;

    last = last->next;

    pre->next = last;

    while(start != last)

    {

    LNode *del = start;

    start = start->next;

    free(del);

    }

    }

    }

  • 中秋節和大豐收的關聯?
  • 目前為止,你覺得華為的哪款型號可以稱得上為頂級之作?