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 are the scenarios in which an element can be inserted into the circular queue?
What is time complexity of binary search?
What is difference between treeset hashset linkedhashset?
What are linear and non linear data structures?
When would you use a tuple?
What is raid (redundant array of inexpensive disks)? Explain its level?
What is dynamic data structure?
What are the different types of data type?
Does concat mutate array?
Explain about map and their types?
What is a string array?
What is binary tree in computer science?
Is there any difference between int[] a and int a[]?
What do you mean by general trees?
Explain the term tail recursion?