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


Please Help Members By Posting Answers For Below Questions

Define a binary search tree?

563


Explain the Linked List

646


What is array and its types in data structure?

504


Can you use Bubble Sort To sort the number of elements.

504


What is the default capacity of hashmap?

416






Write a program using mergesort technique.

543


Mention the data structures which are used in graph implementation.

470


What is a B tree?

593


Define degree of the node?

564


How do you solve a selection sort?

508


Is binary tree a bst?

513


Which is better selection or bubble sort?

496


What is top in stack?

453


What are hash tables good for?

473


Define hash table?

546