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
How to creat ATM project by using double linked list?

An interesting application or implementation of trees is the playing of games such as tie-tac-toe, chess, nim, kalam, chess, go etc. We can depict the sequence of possible moves

what algorithms can i use for the above title in my project desing and implmentation of road transport booking system

write an algorithm given each students name and grade points for six courses.find his grade point average and group students into the gpa groups 3.5

In this part, students are allowed to implement the following simplifications in their table and data design. o Availability for the beauty therapists don't have to be considere

Q. Suggest a method of implementing two stacks in one array such that as long as space is there in an array, you should be capable to add an element in either stack. Using proposed

Define the External Path Length The External Path Length E of an extended binary tree is explained as the sum of the lengths of the paths - taken over all external nodes- from

Book to refer: Introduction to Algorithms, 3rd Ed, by Clifford Stein, Thomas H. Cormen, Ronald Rivest, Charles E. Leiserson Question: Tic Tac Toe game -Design a GUI and implement

What do we mean by algorithm? What are the characteristics of a good and relevant algorithm? An algorithm is "a step-by-step procedure for finishing some task'' An algorithm c

what happen''s in my computer when i input any passage