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
What is the use of treemap?
List the types of rotations available in splay tree?
What type of memory allocation is referred for Linked lists?
What are the different data structures?
Define tree edge?
What is hashing with example?
Is a hashmap a dictionary?
Why would you use a linked list?
What is the use of hashtable?
What is the two-dimensional array?
What is the order of selection sort?
Explain different methods in which you can traverse a tree?
What is sorting with example?
Can arraylist contain duplicates?
Why do we need a data structure?