check the link given by DK for queue and see my post in this thread for stack for doing in O(1)......you guys are discussing the things which are already discussed !! --
Amol Sharma Third Year Student Computer Science and Engineering MNNIT Allahabad On Mon, Aug 1, 2011 at 11:20 AM, Aman (neshu) Agarwal < neshuagarwal1...@gmail.com> wrote: > Think in terms of vector(C++, STL) :P > > > On Mon, Aug 1, 2011 at 11:01 AM, ankit sablok <ankit4...@gmail.com> wrote: > >> finding min will not take O(1) time in a stack i guess >> >> >> On Mon, Aug 1, 2011 at 10:32 AM, kartik sachan >> <kartik.sac...@gmail.com>wrote: >> >>> I think its stack where deletion insertion and finding min (as we will >>> cal min at the time of insertion only by taking min val ) will take O(1) >>> time >>> >>> correct me if i am worng...! >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Algorithm Geeks" group. >>> To post to this group, send email to algogeeks@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. >>> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Algorithm Geeks" group. >> To post to this group, send email to algogeeks@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. >> > > > > -- > Aman Agarwal > > "Success is not final, Failure is not fatal: It is the courage to continue > that counts!" > > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to algogeeks@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. > -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@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.