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

What is collections singletonlist?

568


Do you know what is linear search?

598


What is the Insertion Sort Code?.

729


What is circular linked list?

594


What is mean by sorting?

585






What is the non linear data structure?

553


How hashmap increases its size?

675


Explain linked list in short.

592


What is complete binary tree in data structure?

595


What is a minimum spanning tree?

643


Why is hashmap faster than arraylist?

616


Write a program for reversing the Single Linked List?

812


What are the two types of data?

551


What is bubble sort algorithm in data structure sort and searching?

608


Is copyonwritearraylist thread safe?

555