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
totoo po ba ang manga aliens!
How does an stl file work?
When did c++ add stl?
Why should a c++ programmer be interested in stl?
What do stl stand for?
Is stl open source?
What is a stl vector?
What is stl language?
What does stl stand for in basketball?
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.
write a program that will accept a number and print.its equivalent in words the maximum input number is 9999
What are the symptoms of stl?
To modify an, existing worksheet. What steps are involved for: 1. Inserting and deleting rows and columns. 2. Printing cell formulas 3Jld displayed values 3. Using the page setup command
How stl is different from the c++ standard library?
Describe how to safeguard a system through acquisition of an antivirus Program and systematic backup.