Y do we need to deque and enque the nodes again the problem is similar
to the node given in the linked list and delete that node.
solution is :
copy the next node data to the node to be deleted(ie node holding -ve
number) and delete the next node.
in this way order won't be changed.
Correct me if i am wrong


On Jun 10, 3:14 pm, Sangeeta <[email protected]> wrote:
> write an algo that deletes all negative integers without changing the
> order of remaining elements of the queue

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