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
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
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
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
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.
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
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
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
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
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
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
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
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
13 matches
Mail list logo