In BST the height can be made as bad as u can but in case of btree the
height can not be more than log n base 2 because for each internal node it
is necessary to have at least 2 child and here all the leaf nodes must be
at the same label.
On Sun, Apr 1, 2012 at 8:34 PM, arun kumar
Suppose you are given some convex polygon . Now suppose you want to
divide the polygon area into a number of grids . And I want to find
the points after we have divided the polygon .
For simplicity u can consider convex polygon , don't take into account
concave or self intersecting polygon .
in-place is O(1) auxiliary space. Could you please of something else?
On Thursday, 5 April 2012 10:24:09 UTC+5:30, Rujin Cao wrote:
=?utf-8?Q?_bit_integers,_sort_them_in-place_in_O(n)_time?=
MIME-Version: 1.0
Content-Type: multipart/alternative;
@Don: Any ideas which oppose the above proposed solution?
On Saturday, 24 March 2012 21:52:49 UTC+5:30, Don wrote:
Build a graph in which each box is a vertex and there is an edge from
A to B if B can fit inside A. Then use the longest path algorithm to
find the solution.
Don
On Mar
@Don:
Could you please explain ur tree approach with an example?
Thanks
Doom
On Tuesday, 3 April 2012 02:52:17 UTC+5:30, Don wrote:
I did that by building a tree in which each node stores the
configuration, including number of steps to that point, amount of
water in each bucket, and a
If you just want to know the integer points which are inside the
polygon, you can do this:
Find the min and max y values for the segments making up the polygon.
Call them minY and maxY.
For y = minY to maxY
Find points where polygon segments intersect y. Call them minX and
maxX.
For x =
code needed…
not ble to visualize what to do if there are too many spikes and valleys in the
multiple times rotated array, is that possible??
On Sep 28, 2011, at 1:36 AM, Gene wrote:
Indeed you must be given that all the array elements are unique or at
least that there are no more than