A binary search, such as bsearch() performs, is much faster than a linear search. A hashing algorithm can provide even faster searching. One particularly interesting and fast method for searching is to keep the data in a ?digital trie.? A digital trie offers the prospect of being able to search for an item in essentially a constant amount of time, independent of how many items are in the data set.
A digital trie combines aspects of binary searching, radix searching, and hashing. The term ?digital trie? refers to the data structure used to hold the items to be searched. It is a multilevel data structure that branches N ways at each level.
If you have the better answer, then send it to us. We will display your answer after the approval.