Abstract
In this article a variation of binary search applicable to a linked list structure is examined. There are no additional data structure properties imposed on the list; that is the list may be singly or multiply linked, but it is not required that the list be represented as a binary tree. The process can be used with improved efficiency in place of linear search on a linked list where introducing additional data structures complexity on the list is not desirable.This procedure seems appropriate for inclusion in data structures courses where searching and sorting are discussed. The texts on data structures cover the binary search on a fixed length sequence, but the general consensus is that there is no advantage in trying to implement the binary search process on linked lists. One possible exception in this regard, where no details are provided, is [2, page 147].
- [1] The Art of Computer Programming, Volume 3: Searching and Sorting, by D.E. Knuth, Addison-Wesley, Reading, Massachusetts, 1973.Google Scholar
- [2] Principles of Data Structures and Algorithms with Pascal , by Robert R. Korfhage and Norman E. Gibbs, Wm. C. Brown Publishers, Dubuque, Iowa, 1987. Google ScholarDigital Library
- [3] Data Structure Techniques, by Thomas A. Standish, Addison-Wesley, Reading, Massachusetts, 1980. Google ScholarDigital Library
Index Terms
- Using binary search on a linked list
Recommendations
Time distribution analysis for binary search of a linked list
The aim of this article is to determine the probability distribution of sorting time for different sized linked lists utilizing binary search method and its comparison with results for sequential and binary tree search methods. In [1] the concept of ...
O(1)-time unsorting by prefix-reversals in a boustrophedon linked list
FUN'10: Proceedings of the 5th international conference on Fun with algorithmsConventional wisdom suggests that O(k)-time is required to reverse a substring of length k. To reduce this time complexity, a simple and unorthodox data structure is introduced. A boustrophedon linked list is a doubly-linked list, except that each node ...
Comments