0

If i am trying to do a lookup or insert then how do i ensure that it has a O(log n) worst case instead of O(n)?

I have tried to look it up and apparently the solution to this is to sort the values but it seems like you can not sort a hash table without increasing the complexity which is not what i am hoping for.

Language is Java.

0 Answers0