Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void BuildTableStr(Node * root){
- if (root->left!=NULL){
- shCode.push_back("0");
- BuildTableStr(root->left);
- }
- if (root->right!=NULL){
- shCode.push_back("1");
- BuildTableStr(root->right);
- }
- if(root->left==NULL && root->right == NULL) strTable[root->ch] = shCode;
- if (shCode.size () > 0) shCode.resize (shCode.size () - 1);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement