keep min for stack is easy. just use another stack to keep the min for each top.
Sent from Nexus one On Jan 2, 2011 11:43 AM, "Anuj Kumar" <anuj.bhambh...@gmail.com> wrote: > @juver++ how will implwment find_min() function? > > On Sun, Jan 2, 2011 at 2:33 PM, juver++ <avpostni...@gmail.com> wrote: > >> Simulate queue using two stacks. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Algorithm Geeks" group. >> To post to this group, send email to algoge...@googlegroups.com. >> To unsubscribe from this group, send email to >> algogeeks+unsubscr...@googlegroups.com<algogeeks%2bunsubscr...@googlegroups.com> <algogeeks%2bunsubscr...@googlegroups.com<algogeeks%252bunsubscr...@googlegroups.com> > >> . >> For more options, visit this group at >> http://groups.google.com/group/algogeeks?hl=en. >> > > > > -- > Anuj Kumar > Third Year Undergraduate, > Dept. of Computer Science and Engineering > NIT Durgapur > > -- > You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. > To post to this group, send email to algoge...@googlegroups.com. > To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com<algogeeks%2bunsubscr...@googlegroups.com> . > 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 algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.