Ask your own question, for FREE!
Computer Science 17 Online
OpenStudy (anonymous):

what data structure has a O(1) for search, insert and getMin? Some kind of double hashed ppl?

OpenStudy (anonymous):

O(1) on a search? Is that even possible? I heard the best examples of searching were O(log n) in searches like QuickSort. I guess a stack and a queue would be able to handle Pop, Push, Peek at O(1), or a very close linear result.

OpenStudy (anonymous):

O(1) for search doesn't exist unless you mean does something exist in the collection, in that case you can get O(1) with hash tables. Hash Tables are O(1) for look up, amortized O(1) on insert, if you kept track of the min on insert and delete then getmin could be O(1). Searches are best done with Binary Searches run in O(log n)

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!