How Do u basically find the Median of BST in place ?
Are u trying to find the median just by traversing once ?
/
Bala
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this group, se
Hi all
I dint get that one straight.
Diameter is the dist. btw 2 farthest nodes la. ?
So . wheres the Qn of pendant vertex and other stuffs come. ?
Pls explain ur Soln ?
--
Bala
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the G
Hey..
How can reduce the Comp from O(n) to O(log n)
How are arranging the lines [ nC2 lines]
for the purpose of finding the max no of collinear points
For finding all lines O(n^2)
For Checking the presence ..O(n)
Pls reply ,,How can u reduce the comp to Log n.
Bala
On May 14, 6:57 pm, "[EMAIL
@Jeth
Hi
Just thot a Soln
Since we need to check whether the length of any path btw any two
nodes in a grph
it s enough if we checkwhether the Height of DFS tree [/Forest] is max
of 2.
If so then the ttask underlying is accomplished.
Notify if my intution s not crt
Open 4 comments
Regards
Hi
Think thats not, possible
Is ur soln : this way
Arr : a[1 ...n]
New Arr = newRR[ loga[i] .log[an] ]
and Finding the max sum..
If so it ca be done as OLog is not defined for negative numbers ..
Bala
On Apr 26, 9:24 am, Arunachalam <[EMAIL PROTECTED]> wrote:
> Multiplication can be convert
Hi
Try to Elaborate the Explanation ..plss
--~--~-~--~~~---~--~~
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, se
int *p;
void PrintallComb(int i)
{
int j=0;
if(i == nBits)
{
for(j=0;jhttp://groups.google.com/group/algogeeks
-~--~~~~--~~--~--~---
Hi,,
Think the No of 1 bits can be found in o(k) where k is the no of bits
set
while((n & (n-1)) >= 0)
{
c++;
n = n & (n-1);
printf(">> n %d Cnt %d \n",n,c);
if(!n)
break;
}
printf("Cnt %d \n",c);
--~--~-~--~~~---~--~
Hi..
Think Ur Algo Will work only when u and v are at equal height frm
their Common ancestor 'P'
So U need to think of all possibilities
Node* ClosestCommonAncestor(Node* u, Node* v)
{
if(! u && v )
return NULL;
if( u == v)
return u->parent;
x = ClosestCommonAnce
Can we MAP this variant to Finding the largest Bound rect in a BAR
graph..?
Think so.
I can be done by Iterative Usage of the Same algo(as Bar grph) at evry
row from Bottom.
Open for Suggestions ...
On Mar 12, 11:40 pm, "Karthik Singaram L" <[EMAIL PROTECTED]>
wrote:
> Another variant...(or rat
HI na,
Thought of Heaps.
FIXHEAP is O(n) Can we use Fix heap so that the Array obeys Heap's
shape and value property..
Then We can disp .Level order Traversal.
Note : But i am not sure about the Shape of givn Binary tree,,:)
Waht has to be dne if it doesnt obey Heap's Shape property
On Mar 13,
How to find the Rectangle of Max sum in a 2D matrix consisting of both
+ve and -ve numbers,,,
Logic needed ..
No brute Force pls...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post t
1. How to find the largest bound rectangle in a bar graph
It seems a Google question was to solve this in O(Log n)
Try any Soln..and Post it..
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" gro
13 matches
Mail list logo