Tree/HuffmanTree.c
void preOrder(HFTree* T, int index) {
    if (index != -1) {
        printf("%d ", T -> data[index].weight);
        preOrder(T, T -> data[index].lchild);
        preOrder(T, T -> data[index].rchild);
    }
}
/**
 * pre order tree
 * @param T the pointer of tree root node
 * @param index the index of tree node
 */
pre order tree
@param T the pointer of tree root node
@param index the index of tree node
pre order tree @param T the pointer of tree root node @param index the index of tree node
void preOrder(HFTree* T, int index) {
    if (index != -1) {
        printf("%d ", T -> data[index].weight);
        preOrder(T, T -> data[index].lchild);
        preOrder(T, T -> data[index].rchild);
    }
}
void preOrder ( HFTree * T , int index ) { if ( index != -1 ) { printf ( " " , T -> data [ index ] . weight ) ; preOrder ( T , T -> data [ index ] . lchild ) ; preOrder ( T , T -> data [ index ] . rchild ) ; } }
pre order tree
 @param T the pointer of tree root node
 @param index the index of tree node
pre order tree @param T the pointer of tree root node @param index the index of tree node