I can't see a way to do this in less than O(n) time, unless I can take
advantage of the way the data is stored. If the numbers were stored in
a simple C-style array, and the numbers were sparsely missing,
something like this could be done:
//This value is to be adjusted based on the character
Ok, i've understood; you're problem is related to the one of drawing
planar graphs (is it correct?).
I can't tell you ('cause i don't know) a proper algorithm but you might
find it useful to look at this:
http://www.graphviz.org/Theory.php
at least to have an idea of what the problem is then
well... i dont check this grp that frequently.
but well... if u know hungerian then, Hopcroft is similar to hungarian except u need BFS here, and in initial push all the unmatched vertex of Left in Queue, thats all.
On 8/21/06, phoenixinter [EMAIL PROTECTED] wrote:
Hi guysI'm recently trying to
Amal wrote:
There are 2 arrays say array A and array B given whose size is 'n'. Now i
have to find the first n maximum values of a[i]+b[j] . I would like to know
O(n) or O(n logn ) solutions if some exist.
Amal.
--=_Part_970_27502863.1156574260653
Content-Type: text/html;