Limitation of binary search, Data Structure & Algorithms

Assignment Help:

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.

 

 


Related Discussions:- Limitation of binary search

What is the best case complexity of quick sort, What is the best case compl...

What is the best case complexity of quick sort In the best case complexity, the pivot is in the middle.

Queue, algorithm for insertion in a queue using pointers

algorithm for insertion in a queue using pointers

..#title, whate is meant by the term heuristic

whate is meant by the term heuristic

Algorithsm, What are the properties of an algorithsm?

What are the properties of an algorithsm?

Interest rate, explain the determination of interest rate in the classical ...

explain the determination of interest rate in the classical system.

Implementation of stack, Implementation of Stack :- Stacks can be execu...

Implementation of Stack :- Stacks can be executed in the 2 ways: a)  Arrays b)  Linked List

BINARY SEARCH, GIVE TRACE OF BINARY SEARCH ALGORITHM BY USING A SUITABLE EX...

GIVE TRACE OF BINARY SEARCH ALGORITHM BY USING A SUITABLE EXAMPLE.

Write stream analogues of list processing functions, (a) Write (delay ) as...

(a) Write (delay ) as a special form for (lambda () ) and (force ), as discussed in class. (b) Write (stream-cons x y) as a special form, as discussed in class. (c) Write

Depth of complete binary tree, What will be depth do , of complete binary t...

What will be depth do , of complete binary tree of n nodes, where nodes are labelled from 1 to n with root as node and last leaf node as node n

Algorithm to delete the specific node from binary searchtree, Q. Write down...

Q. Write down an algorithm to delete the specific node from binary search tree. Trace the algorithm to delete a node (10) from the following given tree. Ans. Algor

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd