how to swap two numbers in a linked list without exchanging
the data but only the links?
Answer Posted / pavny
Suppose List contains 3 no. 10, 20, 30
try to exchange 10 and 20.
head points to 10.
temp = head;
head = head -> next;
temp -> next = head - next;
head -> next = temp;
I think it works..
| Is This Answer Correct ? | 3 Yes | 2 No |
Post New Answer View All Answers
What is stl in oop?
How do you convert stl to steps?
a program using one dimensional array that searches a number if it is found on the list of given input numbers given by the user and locate its exact location in the list.
how can u do connectivity in c++ language? plz send me connectivity code in c++ ?
Is stl part of c++ standard?
i wanted to know about questions about c,c++ , which is required for placements.... im a fresher
What does stl mean in slang?
What is stl stand for?
Describe the My Computer and My Documents folders; identify the elements that are present in every Window.
How is stl different from c++ standard library?
how to making game in c++ ?
How connect plc and pc through software
Is string part of stl?
What are the various types of stl containers?
What is stl in c++ with example?