Limitation of binary search, Data Structure & Algorithms

Limitation of Binary Search: -

(i)  The complexity of Binary search is O (log2 n). The complexity is similar irrespective of the position of the element, even if it is not present in the array.

(ii)  The algorithm supposes that one has direct access to middle element in the list on a sub list. This means that the list must be kept in some type of array. Unfortunately inserting an element in an array requires element to be moved down the list and deleting an element from an array needs element to be moved up the list.

(iii) The list must be sorted.

 

 

Posted Date: 5/11/2013 1:37:35 AM | Location : United States







Related Discussions:- Limitation of binary search, Assignment Help, Ask Question on Limitation of binary search, Get Answer, Expert's Help, Limitation of binary search Discussions

Write discussion on Limitation of binary search
Your posts are moderated
Related Questions
Define container in terms of  object-oriented terms A Container is a broad category whose instances are all more specific things; there is never anything which is just a Contai

MID SQUARE METHOD

Graph Traversal In many problems we wish to investigate all the vertices in a graph in some systematic order. In graph we often do not have any single vertex singled out as spe

Q. What do you mean by the best case complexity of quick sort and outline why it is so. How would its worst case behaviour arise?

Q. Construct a complete binary tree with depth 3 for this tree which is maintained in the memory using the linked representation. Make the adjacency list and adjacency matrix for t

implement multiple stack in one dimensional array

What are stored and derived attributes?  Stored attributes: The attributes kept in a data base are called stored attributes.  Derived attributes: The attributes that are

What do you mean by hash clash? Hashing is not perfect. Occasionally, a collision occurs when two different keys hash into the same hash value and are assigned to the same arra

Q1. Define the following terms: (i) Abstract data type. (ii) Column major ordering for arrays. (iii)  Row major ordering for arrays. Q2. Explain the following: (i) A

give any example of page replacement using fifo and use your own reference string