create an singly linked lists and reverse the lists by
interchanging the links and not the data?
Answer Posted / vimesh
struct node
{
int data;
node *link;
};
node *p=NULL;
void reverse(*x)
{
node *r,*s,*q;
r=NULL;
q=x
while(q->link!=NULL)
{
s=r;
r=q;
q=q->link;
r->link=s;
}
x=r;
}
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
What are the types of queues?
Why is bubble sort stable?
Why is data structure?
Define in brief an array. What are the types of array operations?
What do you mean by the term “percolate down”?
Is hashset synchronized?
Explain binary searching, Fibonacci search.
Is arraylist heterogeneous?
What is the difference between a hashmap and hashtable?
What is difference between tree and forest?
What is inserting in data structure?
Which is the parent class of deque
What is the difference between hashset and arraylist?
State the different ways of representing expressions?
What is data structure what is need of it?