how to swap two numbers in a linked list without exchanging
the data but only the links?
Answer Posted / sha
let q=20,r=10 and p be a node previous to q
sequence is p-q-r
temp is pointer of link list.
then
temp=p->next;
p->next=temp->next;
p->next->next=temp;
and temp next can be conected to p->next->next->next if
there is any
| Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
What is the stl, standard template library?
what is template and type convertion
What is a stl vector?
How do you convert stl to steps?
Why should a c++ programmer be interested in stl?
draw a flowchart that accepts two numbers and checks if the first is divisible by the second.
What is stl in c++ with example?
totoo po ba ang manga aliens!
help me i need a c++ program which takes sequesnce of characters and outputed sequence of their token taypes, work same compiler in lexical analysis phase
What are stl algorithms?
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.
sir please send me bpcl previous question papers
What two types of containers does the stl provide?
How stl is different from the c++ standard library?
Is stl open source?