Re: [algogeeks] OS galvin sol..

2011-01-21 Thread jayapriya surendran
wow..thank you so much

On Wed, Jan 19, 2011 at 2:08 PM, LALIT SHARMA  wrote:

>
>
> --
> Lalit Kishore Sharma,
>
> IIIT Allahabad (Amethi Capmus),
> 6th Sem.
>
> --
> 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, send email to
> algogeeks+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
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, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Directi question-centre of the tree

2010-09-29 Thread jayapriya surendran
In graph theory, a tree is defined as a graph on N nodes,and (N-1)
un-directed edges such that there are no cycles in the graph.Each node
has a single unique path to every other node.
Let D(u,v) be the number of edges in the unique path from node 'u' to
node 'v' (or from node 'v' to 'u' since the edges are
un-directed).D(u,u) is 0 for all nodes 'u'.
M(u)=MAX(D(u,i):for all nodes i)
The center of a tree is the node (or nodes) 'u',for which M(u) is
minimum among all the nodes in the graph.
You'll be given a graph which has N nodes (1<=N<=20).The nodes are
labeled 1,2,3,..N.You will be provided with N-1 edges in the form of
"a b" pairs where 1<=a,b<=N.No edge will be repeated.You can assume
that the edges are specified such that the graph is a valid tree as
defined above.
Output the node labels of the center(or centers) of the tree.
Sample Input:
6(value of N)
1 3 (edges)
1 4
1 2
2 5
2 6

Sample Output
1
2
Expected:O(N) complexity algo
can anyone plz help me out with O(N) algo?

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Brent's algorithm

2010-08-19 Thread jayapriya surendran
@Nikhil : Thanks a lot.

On Wed, Aug 18, 2010 at 10:32 AM, jaladhi dave  wrote:
> Check out this link
>
> http://en.wikipedia.org/wiki/Cycle_detection
>
>
>
>
> On Wed, Aug 18, 2010 at 5:12 AM, jayapriya surendran 
> wrote:
>>
>> hi..i wanna know what is brent's algorithm n whether it can be used to
>> detect loops in linked list.If yes..is it better than Floyd's cycle
>> finding algo?
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To post to this group, send email to algoge...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algoge...@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Brent's algorithm

2010-08-18 Thread jayapriya surendran
ya i checked out the algo..all i need is whether we can use it to
detect loop in a linked list..if yes please do give the
implementation.Thanks in advance.

On Wed, Aug 18, 2010 at 12:16 PM, Prem Mallappa  wrote:
> information is available on Internet,
>  - Wikipedia is a ocean of knowledge.
>  - Google.com
>  - Numerical recipies in C ( I think it has some reference to Brents
> algo)
>
> Not sure about this algo's applications in detection of loops in
> linked list.
>
>
> On 18 Aug, 04:42, jayapriya surendran  wrote:
>> hi..i wanna know what is brent's algorithm n whether it can be used to
>> detect loops in linked list.If yes..is it better than Floyd's cycle
>> finding algo?
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Algorithm Geeks" group.
> To post to this group, send email to algoge...@googlegroups.com.
> To unsubscribe from this group, send email to 
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/algogeeks?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Brent's algorithm

2010-08-17 Thread jayapriya surendran
hi..i wanna know what is brent's algorithm n whether it can be used to
detect loops in linked list.If yes..is it better than Floyd's cycle
finding algo?

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Starting Out

2010-05-25 Thread jayapriya surendran
@abhijit : thanks a lot.
@sharad kumar : no MIT 2007 batch..



-- 
Thanks and Regards
Jayapriya Surendran

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.