Advertisement
Guest User

Untitled

a guest
Feb 26th, 2015
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. for (ptr = front; ptr != NULL; ptr = ptr->next) {
  2. if (ptr->lrCount < ptr->next->lrCount) {
  3. strcpy(tempNode->word, ptr->word); //this work!?!?!
  4. tempNode->lrCount = ptr->lrCount;
  5. tempNode->rbCount = ptr->rbCount;
  6.  
  7. strcpy(ptr->word, ptr->next->word); //this work!?!?!
  8. ptr->lrCount = ptr->next->lrCount;
  9. ptr->rbCount = ptr->next->rbCount;
  10.  
  11. strcpy(ptr->next->word, tempNode->word); //this work!?!?!
  12. ptr->next->lrCount = tempNode->lrCount;
  13. ptr->next->rbCount = tempNode->rbCount;
  14. }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement