create an singly linked lists and reverse the lists by
interchanging the links and not the data?
Answer Posted / vaishali naidu
We can achive this using following method:
Use three pointers
First is start pointing to first node.
Second is prev pointing to second node
Third is curr pointing to third node.
a.while(start!=curr)
{
prev->next=start
start->next=NULL;
start=prev;
prev=curr;
curr=curr->next;
}
Is This Answer Correct ? | 13 Yes | 21 No |
Post New Answer View All Answers
What is the prerequisite for binary searching?
Is vector synchronized?
Find duplicates in infinite range. Which data structure to be used to give efficient solution?
Advanced problems related to Data Structures were asked
Describe the complexity of Binary search
How do you do a mergesort?
Explain binary representation?
Does hashmap maintain insertion order?
List out the advantages of using a linked list?
How to sequentially represent max-heap?
What is a subtree in data structures?
Can you please explain the difference between string and an array?
How do you sort an arraylist in descending order?
What are the properties of binary tree?
Which interfaces are implemented by hashmap?