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


Please Help Members By Posting Answers For Below Questions

Define stl.

873


What does stl mean in slang?

727


How is stl different from c++ standard library?

845


sir please send me bpcl previous question papers

2043


What is stl stand for?

811






please visit this site you'll find my question this is my homework please answer it if you can http://easyscience.org/ib/lofiversion/index.php/t36168.html

1864


What is stl in c++ with example?

731


How stl is different from the c++ standard library?

727


How connect plc and pc through software

2032


What is the use of stl?

727


Who wrote stl?

786


What is a stl vector?

707


i wanted to know about questions about c,c++ , which is required for placements.... im a fresher

1793


how can u do connectivity in c++ language? plz send me connectivity code in c++ ?

1995


write a program to convert a decimal number in to its equivalent binary number?

2162