Does anyone know what are the relative search speed for binary search, hash tables and array for a dictionary (sorted/undorted)?
Any suggestions would be greatly appreciated.
Does anyone know what are the relative search speed for binary search, hash tables and array for a dictionary (sorted/undorted)?
Any suggestions would be greatly appreciated.
look for it in data structure books. most books have these math expressions.
binary search is something like 2ln(n) (for worst case or Big-O) not sure though.
look for the books. or search the web.
>Does anyone know what are the relative search speed for binary search
O(logN) // Logarithmic
>hash tables
O(1) // Constant
>and array for a dictionary
O(N) // Linear for unsorted
O(logN) // Logarithmic for sorted because you should be using binary search
p.s. What the alphabet would look like without q and r.