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

Frequency count, what is frequency count with examble? examble?

what is frequency count with examble? examble?

Graph, explain the prims''s algorithm with suitable example?

explain the prims''s algorithm with suitable example?

Algorithm that inputs the codes for all items in stock, A shop sells books,...

A shop sells books, magazines and maps. Every item is identified by a unique 4 - digit code. All books have a code which starts with 1, all maps have a code starting with 2 and all

Algorithms and flowcharts, write an algorithm and draw a flowchart to calcu...

write an algorithm and draw a flowchart to calculate the perimeter and area of a circle

Explain open addressing, Open addressing The easiest way to resolve a c...

Open addressing The easiest way to resolve a collision is to start with the hash address and do a sequential search by the table for an empty location.

Functions for inserting and deleting at either end of deque, Q. Devise a re...

Q. Devise a representation for a given list where insertions and deletions can be made at both the ends. Such a structure is called Deque (which means Double ended queue). Write fu

Technique for direct search, Technique for direct search is    Hashing ...

Technique for direct search is    Hashing is the used for direct search.

Registers, what are registers? why we need register? Definition? Types? Wha...

what are registers? why we need register? Definition? Types? What registers can do for us?

Compound interest, Write the algorithm for compound interest

Write the algorithm for compound interest

An undirected graph g with n vertices and e edges, An undirected graph G wi...

An undirected graph G with n vertices and e edges is shown by adjacency list.  What is the time required to generate all the connected components? O (e+n)

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