Answer the question
In order to leave comments, you need to log in
Data structure
Suggest a data structure for which:
Answer the question
In order to leave comments, you need to log in
In my opinion, the only option with the expected O(1) is a hash table. If the data is known, you can choose the perfect hash function and then O (1) will be guaranteed.
ummm. I'm afraid to embarrass myself in front of the entire district, but ... a dynamic array?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question