You are viewing a single comment's thread. Return to all comments →
void decode_huff(node * root,string s) { node * ptr; int n;
ptr = root; for(n=0;s[n];n++) { ptr = (s[n] == '0') ? ptr->left : ptr->right; if(ptr->data) { cout << ptr->data; ptr = root; } }
}
Seems like cookies are disabled on this browser, please enable them to open this website
Tree: Huffman Decoding
You are viewing a single comment's thread. Return to all comments →
void decode_huff(node * root,string s) { node * ptr; int n;
}