[algogeeks] Earn Money Online! No Registration Fees. Guaranteed Payments.

2007-11-09 Thread Riaz Muhammad
http://www.moneycosmos.com/?r=321740 --~--~-~--~~~---~--~~ 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

[algogeeks] Call or Send SMS to any phone anywhere in the world Free!

2007-11-09 Thread Riaz Muhammad
Call or Send SMS to any phone anywhere in the world Free! - http://offr.biz/HLGB7321740QUQKUQA --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to

[algogeeks] Re: Algo.. phone book

2007-11-09 Thread Varun S V
I was asked the same question in my google interview!! The best solution for this is to use the TRIE data structure!! Google TRIE data structure for more details. It also gives an optimized search complexity. On Nov 8, 2007 11:40 AM, Rajat Gogri [EMAIL PROTECTED] wrote: If you have to

[algogeeks] Re: Algo.. phone book

2007-11-09 Thread Andrey
I thought about trie first but then I've change my mind and decided that I'd rater use a simple binary tree or even an sorted array. As we have quite limited set of first names and surnames we can easily index them i.e. store them in sorted array and use an index in the array indead of the

[algogeeks] Re: Discussion on unique-elements-in-an-array

2007-11-09 Thread Pramod Negi
which algo sort array in O(N lgN) without extra space?? On 11/6/07, Andrey [EMAIL PROTECTED] wrote: dor is absolutely right O(N*log(N)) is straightforward.. sort the array in O(N*log(N)) and then remove duplicates in linear time. it doesn't need any extra memory.

[algogeeks] Re: Discussion on unique-elements-in-an-array

2007-11-09 Thread Andrey
Heapsort http://en.wikipedia.org/wiki/Heapsort#Comparison_with_other_sorts On Nov 9, 3:54 pm, Pramod Negi [EMAIL PROTECTED] wrote: which algo sort array in O(N lgN) without extra space?? On 11/6/07, Andrey [EMAIL PROTECTED] wrote: dor is absolutely right O(N*log(N)) is

[algogeeks] Re: Discussion on unique-elements-in-an-array

2007-11-09 Thread Pramod Negi
i think if array of n elements is given and to make a heap out of it we need O(n) space. heap sort will surely take constant amount of auxially space if heap is already build. isn't it? correct me if i m wrong.. On 11/9/07, Andrey [EMAIL PROTECTED] wrote: Heapsort

[algogeeks] Earn Money Online! No Registration Fees. Guaranteed Payments.

2007-11-09 Thread Riaz Muhammad
http://www.moneycosmos.com/?r=321740 --~--~-~--~~~---~--~~ 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

[algogeeks] Re: Algo.. phone book

2007-11-09 Thread Ajinkya Kale
How about using a Red-Black tree ? On 11/9/07, Andrey [EMAIL PROTECTED] wrote: I thought about trie first but then I've change my mind and decided that I'd rater use a simple binary tree or even an sorted array. As we have quite limited set of first names and surnames we can easily index

[algogeeks] Re: Algo.. phone book

2007-11-09 Thread Andrey
No reasons, the structure is static so sorted array is the fastest way. Don't know how about trie, it's hard to estimate... On 9 нояб, 18:16, Ajinkya Kale [EMAIL PROTECTED] wrote: How about using a Red-Black tree ? On 11/9/07, Andrey [EMAIL PROTECTED] wrote: I thought about trie

[algogeeks] Hashing Algo

2007-11-09 Thread Rajat Gogri
Hello, I was asked this question for MSFT interview. You are given Symbols for stock ticker application, All are 4 character , Capital letters only so min is and max is . for example MSFT, GOOG etcetc How will you hash it??? complexities for insert, delete and Search ??? *I gave him

[algogeeks] Re: Algo.. phone book

2007-11-09 Thread Rajat Gogri
What abt collisions in Trie?? Like if same name then??? On Nov 9, 2007 7:49 AM, Andrey [EMAIL PROTECTED] wrote: I thought about trie first but then I've change my mind and decided that I'd rater use a simple binary tree or even an sorted array. As we have quite limited set of first names

[algogeeks] about graph partition

2007-11-09 Thread Han
I have to partition a graph which has more than 1 million vertexs. Each vertex has an own weight from 1 to 1 thousand. The link between vertexs is sparse,each link has a weight 1. Now I want to partition the graph into about 100 parts. Each part has about the same own weight.I want to make the