두 개의 순환 단일 체인 표를 연결 하고 순환 링크 형식 을 유지 합 니 다.

#include "stdafx.h"
#include 
#include 
#include
typedef int type;
typedef struct lnode //            
{
    int data;
    struct lnode *next;
}Lnode;
typedef Lnode node;
typedef struct dnode//             
{
    int data;
    struct dnode *lnext;
    struct dnode *rnext;
}Dnode;

void combinecirlink18(node *h1, node *h2)
{//  h2   h2         h1      
    node *h2t = getcirlinktail(h2);
    node *p = h1->next;
    h2t->next = p;
    h1->next = h2->next;
    free(h2);
    return ;
}

좋은 웹페이지 즐겨찾기