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

Answer Posted / sanjay rajput

struct node
{
int val;
struct node *next;
};

typedef struct node NODE;
NODE *p,*start;
p=start->next;
while(p!=NULL)
{
p->next=start;
start=p;
p=p->next;
}

Is This Answer Correct ?    1 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

State the rules to be followed during infix to postfix conversions?

700


What are the benefits of using arrays?

511


You want to insert a new item in a binary search tree. How would you do it?

541


Tell me what is quick sort?

548


write an algorithm to show the procedure of insertion into a b-tree?

527






Write a Program for Linked list manipulation.

561


What is queue example?

487


Is hashset a collection?

474


What is copyonwritearraylist?

517


Define splay tree?

598


Can the double-checked locking fail on a single processor system?

565


What are the different data structures?

514


Define double hashing?

571


Which is faster hashmap or concurrenthashmap?

470


Why does hashset use hashmap?

455