[algogeeks] Re: selection problem.....

2008-04-22 Thread Varun S V
Hi Dave, Can you kindly eloborate your algorithm? How can we modify a single array in O(n) time, such that the median comes to become the n/2th element and smaller elements comes to the left side and larger elements comes to the right side? Kindly explain in detail. 2008/4/22 Pramod Negi [EMAIL

[algogeeks] Re: selection problem.....

2008-04-22 Thread Varun S V
PROTECTED]: make a partition about media as a pivot element On 4/22/08, Varun S V [EMAIL PROTECTED] wrote: Hi Dave, Can you kindly eloborate your algorithm? How can we modify a single array in O(n) time, such that the median comes to become the n/2th element and smaller elements comes

[algogeeks] Re: Implementing T9

2007-11-14 Thread Varun S V
TRIE data structure!! On Nov 14, 2007 12:11 PM, srinivas r [EMAIL PROTECTED] wrote: how to implement t9 dictionary... wat data structure ca be used? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Algorithm

[algogeeks] Re: Algo.. phone book

2007-11-10 Thread Varun S V
HI, The phone numbers can be stored at the leaf nodes as said by andrey. And why will there be a collission? All the names stored has to unique. If the names are not unique then we must have an extra pointer to the leaf node, which stores the list of phone numbers, so that the multiple entried are

[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: Implementation of Dijkstra and other shortest path problems.

2007-08-10 Thread Varun S V
Graphs are represented by adjacency matrix or list representation has to be used. U have to use any of these two as they are the standard representation. On 8/9/07, PicO [EMAIL PROTECTED] wrote: how can i use Dijkstra with heap ... how the heap can find the next unvisited element to check ,