create an singly linked lists and reverse the lists by
interchanging the links and not the data?
Answer Posted / vijayan
struct node{
int data;
node * next;
};
node *pt1,*pt2=NULL:
while(root!=NULL)
{
pt1=root;
root=root->next;
pt1->next=pt2;
pt2=pt1;
}
Is This Answer Correct ? | 31 Yes | 3 No |
Post New Answer View All Answers
How does variable declaration affect memory allocation?
Which algorithm is used in collections sort method?
State the demerit of linear representation of binary trees?
What is a Stack? Explain with example?
Describe the types of data structures?
Write a program to sum values of given array.
Can arraylist contain duplicates?
Is radix sort stable?
What is thread and types of thread?
What is an array vs list?
Explain quick sort?
which is the simplest file structure? (Sequential, indexed, random)
Can arraylist contain null?
Define an algorithm. What are the properties of an algorithm? What are the types of algorithms?
Do you know what is linear search?