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 wrote:
> I think, we have to delete all the elements from the heap which takes
> o(n*logn). Please share
Here u r using extra space to store count values..
CHERUVU JAANU REDDY
M.Tech in CSIS
On Tue, May 18, 2010 at 7:01 PM, Jagadish M wrote:
>
> On May 18, 8:29 am, Terence wrote:
> > How do you maintain the heap? Could you explain in de
Use Breadth First search ..
CHERUVU JAANU REDDY
M.Tech in CSIS
On Thu, May 13, 2010 at 9:18 AM, vinayan c wrote:
> 2->
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To po
l : r;
return(tmp);
}
}
}
----
CHERUVU JAANU REDDY
M.Tech in CSIS
On Thu, Apr 8, 2010 at 7:22 PM, Rahul Singh wrote:
> Perform inorder traverse for both the node. match element by element the 2
> strings and when first time the string deviates thats Lowest common
> ancestor.
> -rahul
>
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 wrote:
> Can any one tell how to do this when there are 'm'
2:printf("Deleted element:%d\n",delete());
break;
case 3:exit(0);
break;
}
}
return(0);
}
CHERUVU JAANU REDDY
M.Tech in CSIS
On Mon, Feb 8, 2010 at 1:49 PM, atul verma wrote:
> I dont think its
CHERUVU JAANU REDDY
M.Tech in CSIS
On Sun, Feb 7, 2010 at 7:02 PM, naren 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
> "Al
use memorization u will get in 0(logn)..
On Fri, Apr 3, 2009 at 4:01 PM, alex wrote:
>
> Does anyone has some good algorithm for Fibonacci number question ,get
> the F(n) ,if n is a big number ...
>
>
> >
>
--
----
CHERU
;> j++;
> >> else
> >> c=i;
> >> }
> >> cout< >> return 0;
> >> }
> >>
> >> On Sun, Mar 1, 2009 at 9:50 AM, sharad kumar
> >> wrote:
> >>>
> >>> hi,
> >>> does the above solution need
Given a sorted arrays of N integers, possibly with duplicates, write a
function that
returns the highest index of an element X in that array if found or -1
otherwise.(use Binary search)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to t
10 matches
Mail list logo