create an singly linked lists and reverse the lists by
interchanging the links and not the data?

Answer Posted / jishu

This is a more efficient version of the program given in ans 2.

p=head;
result=NULL;

while(p!=NULL)
{
temp=p->next;

p->next=result;
result=p;

p=temp;

}

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the Queue

740


What is modcount in hashmap?

643


Define a complete binary tree?

685


Is quicksort a stable algorithm?

703


Is vector synchronized?

682


Define left-in threaded tree?

632


What is the difference between array and stack?

722


Is treemap synchronized?

683


What are the Differences between map and hashmap?

674


Define right-in threaded tree?

713


What is map entry?

653


How do you rotate an AVL tree?

724


Explain quick sort?

718


Define tree edge?

674


Define a tree?

755