[algogeeks] Re: An interesting graph problem

2008-02-25 Thread Ridvan
Maybe this will work: Starting from each vertex using BFS calculate the shortest path which passes through vertexes from all the colors. Best, Ridvan On Feb 24, 2:00 pm, Ajinkya Kale [EMAIL PROTECTED] wrote: On 2/24/08, Sticker [EMAIL PROTECTED] wrote: I have a graph problem, which is

[algogeeks] sorting algorithms

2008-02-25 Thread robin
Hi are there any sorting algorithms which run in O(nlogn) time apart from heap sort and merge sort? --~--~-~--~~~---~--~~ 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: sorting algorithms

2008-02-25 Thread Akhil Ravidas
quick sort in NlogN expected time.. On Mon, Feb 25, 2008 at 9:33 PM, robin [EMAIL PROTECTED] wrote: Hi are there any sorting algorithms which run in O(nlogn) time apart from heap sort and merge sort? --~--~-~--~~~---~--~~ You received this message

[algogeeks] Re: sorting algorithms

2008-02-25 Thread Dave
And there is radix sort, which runs in O(n * data key size). Dave On Feb 25, 10:07 am, Akhil Ravidas [EMAIL PROTECTED] wrote: quick sort in NlogN expected time.. On Mon, Feb 25, 2008 at 9:33 PM, robin [EMAIL PROTECTED] wrote:  Hi  are there any sorting algorithms which run in O(nlogn)

[algogeeks] Re: An interesting graph problem

2008-02-25 Thread Satish
Suppose the graph has n colors. Think of all vertices with same color as lying in a same cluster. Hence all we need is the shortest path that goes through some vertex in each of the n clusters. After the ith step suppose we have all the shortest paths, starting from each vertex in the ith