Advertisement
Guest User

Untitled

a guest
Aug 16th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. Node* recursion(Node* head,char* current,char** table)
  2. {
  3. if((head->left!=NULL)|| (head->right!=NULL))
  4. {
  5. if(head->left!=NULL)
  6. {
  7. /*unsure*/ recursion(head->left,strcat(current,0),table);
  8. current[strlen-1]='\0';
  9. }
  10. else if(head->right!=NULL)
  11. {
  12. /*unsure*/ =recursion(head->right,strcat(current,1),table);
  13. current[strlen-1]='\0';
  14. }
  15. }
  16. else
  17. {
  18. table[head->num]=(char*)malloc(256*sizeof(char));
  19. table[head->num]=current;
  20. }
  21. return 0;
  22.  
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement