What’s wrong with my function ? I am trying to merge 2 sorted linked lists( xHead and yHead )…

Need your ASSIGNMENT done? Use our paper writing service to score better and meet your deadlines.


Order a Similar Paper Order a Different Paper
What’s wrong with my function ? I am trying to merge 2 sorted linked lists( xHead and yHead ) into a third one (zHead) sorted, via recursion. Something is wrong with it void SortedMergeRecur(Node*& xHead,Node*& yHead,Node*& zHead) { Node* temp = 0; if(xHead == 0) { zHead = yHead; yHead = 0; } else if(yHead == 0) { zHead = xHead; xHead = 0; } else if(xHead != NULL && yHead != NULL) { if(xHead -> data [removed] data) { zHead = xHead; SortedMergeRecur(xHead -> link, yHead, zHead -> link); xHead = 0; } else if(xHead -> data == yHead -> data) { zHead = yHead; SortedMergeRecur(xHead, yHead -> link, zHead -> link); yHead = 0; } } return; }

"Is this question part of your assignment? We can help"

ORDER NOW
Writerbay.net

Do you need help with this or a different assignment? We offer CONFIDENTIAL, ORIGINAL (Turnitin/LopesWrite/SafeAssign checks), and PRIVATE services using latest (within 5 years) peer-reviewed articles. Kindly click on ORDER NOW to receive an A++ paper from our masters- and PhD writers.

Get a 15% discount on your order using the following coupon code SAVE15


Order a Similar Paper Order a Different Paper