@ Kartikeyan:
If you use normal queue implementation how you are going to print reverse???

(From ptr2 to ptr1)...If you are implementing queue in an array, then your
solution can be feasible..
If not in array, you must modify your queue DS to include pointers to
previous elements.
Or you can do this by emptying queue into stack n then printing nodes...
Am I getting it correct? Or is there anything I am missing?

-- 
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.

Reply via email to