@monang wats the terminating codition..?? On Fri, Jun 10, 2011 at 9:21 PM, Monang Setyawan <[email protected]> wrote:
> I think you don't need other queue to do this, simply enqueue the > non-negative dequeued element to the original queue. > > > On Fri, Jun 10, 2011 at 11:32 AM, ADITYA KUMAR <[email protected]> > wrote: > > since a queue is given ...only queue operations are allowed > > just dequeue all elements from the queue and if a number is +ve enqueue > them > > to other queue > > after this just copy the 2nd queue to 1st one > > O(n) > > > > On Fri, Jun 10, 2011 at 3:44 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. > >> > > > > > > > > -- > > Regards > > Aditya Kumar > > B-tech 3rd year > > Computer Science & Engg. > > MNNIT, Allahabad. > > > > -- > > 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. > > > > -- > 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. > > -- Regards Aditya Kumar B-tech 3rd year Computer Science & Engg. MNNIT, Allahabad. -- 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.
