[algogeeks] Re: Minimum ladders required

2010-10-01 Thread Gönenç Ercan
It is the maximum number of overlapping flights. Sort the all the times in a single array, increment a counter when a plane lands, decrement when it flies. The other algorithm I think can be by assigning the maximum number of flights to different ladders until all flights are assigned. To assign

[algogeeks] Re: How will you find the subarray whose product is k in an array of negative and positive numbers

2010-10-01 Thread Minotauraus
Well, instead of continuously storing the maximum product, you try to equate the product to k, if and when you do, you've found your sub array. To make it faster you can add another condition that when the product k, stop and move to the next element (provided you've sorted the elements first) I

[algogeeks] Re: Hash Table Design

2010-10-01 Thread ligerdave
First, if you have a set of unique usernames, those could be used to be keys. How to generate hash is depends on your requirements. You can add a few prefix chars or postfix On Sep 30, 2:45 pm, amit amitjaspal...@gmail.com wrote: Design a hash table to store phone #s. Your job is to write a hash

Re: Fwd: [algogeeks] Prim's algorithm using min heap

2010-10-01 Thread Soundar
i couldn't find any link here. -- 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

Re: Fwd: [algogeeks] Prim's algorithm using min heap

2010-10-01 Thread Chi
That's kind of a nice hint. Rather then asking: Where is the link!? On Oct 1, 7:10 pm, Soundar soundha...@gmail.com wrote: i couldn't find any link here. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send

[algogeeks] Re: Hash Table Design

2010-10-01 Thread Gönenç Ercan
Use a trie, the memory needed will be less than having a list of strings and it will be faster than hashTable (array implementation of trie). Check Trie in Wikipedia. If the datastructure is going to be static, then using a Directed acyclic finite automata (dafsa) may be even better. On Sep 30,