1. 有序二叉树形如：
10
/   \
6     14
/   \    /    \
4    8 12  16
双向链表形如：
4=6=8=10=12=14=16

三 测试

`/* * change a bst to Double linked list*/#include <stdio.h>#include <stdlib.h>#define N 10typedef int ElemType;typedef struct BSTNode {    ElemType data;    struct BSTNode *lchild;    struct BSTNode *rchild;}BSTNode;typedef struct DLinkNode {    ElemType data;    struct DLinkNode *llink;    struct DLinkNode *rlink;}DLinkNode;DLinkNode *head;void InsertBST(BSTNode **t, ElemType e) {    if(*t == NULL) {        *t = (BSTNode *)calloc(1, sizeof(BSTNode));        if(*t == NULL) {            fprintf(stderr, "memeory eror!\n");            exit(254);        }//        *t = (BSTNode *)malloc(sizeof(BSTNode));        (*t)->lchild = 0;        (*t)->rchild = 0;        (*t)->data = e;    }    else if((*t)->data > e) InsertBST(&(*t)->lchild, e);    else InsertBST(&(*t)->rchild, e);}void PostTranverse(BSTNode *t) {    if(t) {        PostTranverse(t->lchild);//        printf("%d\t", t->data);        CreateDLinkList(t->data);        PostTranverse(t->rchild);    }}/* * to create a double linked list*/void CreateDLinkList(ElemType e) {    static DLinkNode *r;   // be defined in the static area of RAM    if(!head) {        head = (DLinkNode *)calloc(1, sizeof(DLinkNode));        if(head == NULL) {            fprintf(stderr, "memory error!\n");            exit(254);        }        head->llink = 0;        head->rlink = 0;        r = head;    }    DLinkNode *p = (DLinkNode *)calloc(1, sizeof(DLinkNode));    if(p == NULL) {        fprintf(stderr, "memory error!\n");        exit(254);    }    p->data = e;    p->llink = r;    p->rlink = 0;    r->rlink = p;    r = p;}int main() {    int a[N];    int i;    BSTNode *t = NULL;    DLinkNode *p;    for(i = 0;i < N;i++) {        if(scanf("%d", &a[i]) != 1) {            fprintf(stderr, "input error!\n");            exit(EXIT_FAILURE);        }    }    for(i = 0;i < N;i++) {        InsertBST(&t, a[i]);    }    PostTranverse(t);    p = head->rlink;    while(p) {        printf("%d\t", p->data);        p = p->rlink;    }    printf("\n");    return 0;}`