Re: [algogeeks] Re: What is the time to get min element from the binary max heap !!

2011-09-20 Thread CHERUVU JAANU REDDY
We can find minimum element in O(n) time. Just compare leaf nodes in max heap tree. Cheers Janardhan Reddy Cheruvu +91-9642421117 On Tue, Sep 20, 2011 at 6:39 PM, saurabh agrawal saurabh...@gmail.comwrote: I think, we have to delete all the elements from the heap which takes

Re: [algogeeks] First k smallest elements

2010-03-28 Thread CHERUVU JAANU REDDY
you will get k smallest elements and root is kth smallest element in the array this is O(nlogk) CHERUVU JAANU REDDY M.Tech in CSIS On Sun, Mar 28, 2010 at 8:41 PM, abhijith reddy abhijith200...@gmail.comwrote: Can any one tell how to do this when

Re: [algogeeks] Implement a Queue using a stack

2010-02-08 Thread CHERUVU JAANU REDDY
:exit(0); break; } } return(0); } CHERUVU JAANU REDDY M.Tech in CSIS On Mon, Feb 8, 2010 at 1:49 PM, atul verma atul.ii...@gmail.com wrote: I dont think its possible to implement a queue using a single stack. Atul On Mon, Feb

Re: [algogeeks] Implement a Queue using a stack

2010-02-07 Thread CHERUVU JAANU REDDY
CHERUVU JAANU REDDY M.Tech in CSIS On Sun, Feb 7, 2010 at 7:02 PM, naren lalavat38na...@gmail.com wrote: how to Implement a Queue using a stack if space complexity is there... -- You received this message because you are subscribed to the Google Groups

[algogeeks] Re: Fibonacci number

2009-04-04 Thread CHERUVU JAANU REDDY
use memorization u will get in 0(logn).. On Fri, Apr 3, 2009 at 4:01 PM, alex zch051383471...@gmail.com wrote: Does anyone has some good algorithm for Fibonacci number question ,get the F(n) ,if n is a big number ... -- CHERUVU JAANU