Re: [algogeeks] DE Shaw - Data Structure Section Qn

2011-07-28 Thread Akshata Sharma
using array, we can do in O(logn) always as it is ordered. If all values hash to same bucket in case of hashtable, it would be O(n) worse case On Thu, Jul 28, 2011 at 12:03 AM, rajeev bharshetty rajeevr...@gmail.comwrote: Hash Table with Bucket , made of linked list . At most if all n values

Re: [algogeeks] DE Shaw - Data Structure Section Qn

2011-07-28 Thread ankit sambyal
In the question it is specified that the data structure should have a worst case time complexity of O(N) -- 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

[algogeeks] DE Shaw - Data Structure Section Qn

2011-07-27 Thread Reynald
Which of the following data structure do better job (has lesser time complexity) at searching elements that has a worst-case time complexity of O(n)? Do not account for the cost of building the Data structure in searching cost. a) Linked list with element sorted by value b) Binary tree with no

Re: [algogeeks] DE Shaw - Data Structure Section Qn

2011-07-27 Thread rajeev bharshetty
Hash Table with Bucket , made of linked list . At most if all n values hash to same bucket then at worst case we must traverse n linked list nodes to find the element. Hope it is clear On Wed, Jul 27, 2011 at 11:59 PM, Reynald reynaldsus...@gmail.com wrote: Which of the following data

Re: [algogeeks] DE Shaw - Data Structure Section Qn

2011-07-27 Thread SkRiPt KiDdIe
I think Ordered array Search time = O(logn) whereas for bucket complexity=O(sqrt(n)) as it is unordered. -- 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

Re: [algogeeks] DE Shaw - Data Structure Section Qn

2011-07-27 Thread ankit sambyal
d) Hast table with bucket, made up of linked list, where linked list have no ordering. -- 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