I have provided you the solution and I think you are experienced enough to
make the solution yourself but I can provide you a Pseudocode.
//Solution for Doubly linked list
Inverse(node *start, node *end) {
print(end);
}
print(node *start,node *end) {
do {
print(end->data);
end = end->next;
}
while ( end != start )
}
call the functions two times
inverse(0th node,n-1th node);
inverse(nth node, list.size()th node);
--
Akshat Sapra
Under Graduation(B.Tech)
IIIT-Allahabad(Amethi Campus)
--------------------------------------
[email protected]
[email protected]
[email protected]
[email protected]
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.