Data Structure for a particular problem??
Posted
by AGeek
on Stack Overflow
See other posts from Stack Overflow
or by AGeek
Published on 2010-05-23T04:58:14Z
Indexed on
2010/05/23
5:00 UTC
Read the original article
Hit count: 271
algorithm
|data-structures
Hi,
Which data structure can perform insertion, deletion and searching operation in O(1) time in the worst case.
We may assume the set of elements are integers drawn from a finite set 1,2,...,n, and initialization can take O(n) time.
I can only think of implementing a hash table.
Implementing it with Trees will not give O(1) time complexity for any of the operation. Or is it possible??
Kindly share your views on this, or any other data structure apart from these..
Thanks..
© Stack Overflow or respective owner