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

How do you find the complexity of a selection sort?

499


Can hashtable have duplicate values?

530


How do I sort hashset?

501


What is the non linear data structure?

484


Differentiate between hashmap and hashtable.

624






What are the Advantages and disadvantages of Array?

600


Which is better hashmap or hashtable?

478


What is the basic of data structure?

504


What do you mean by structure property in a heap?

542


Which is faster hashmap or treemap?

493


How to sort 1 million floating point numbers?

685


How does linkedhashset work internally?

496


What is the default value of Array?

656


In what areas do data structures are applied?

543


What are the advantages of selecetion sort?

701