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

The number of different directed trees with 3 nodes, The number of differen...

The number of different directed trees with 3 nodes are ?? The number of disimilar directed trees with three nodes are 3

HUFFMAN CODING, Ask question 1. Indicate whether each of the following prop...

Ask question 1. Indicate whether each of the following properties is true for every Huffman code. a. The codewords of the two least frequent symbols have the same length. b. The

Exact analysis of insertion sort, Exact analysis of insertion sort: Let...

Exact analysis of insertion sort: Let us assume the following pseudocode to analyse the exact runtime complexity of insertion sort. T j   is the time taken to execute the s

Sequential files, In this section, we will discuss about Sequential file or...

In this section, we will discuss about Sequential file organization. Sequential files have data records stored in a particular sequence. A sequentially organized file might be stor

Write an algorithm outputs number of books using psuedocode, A shop sells b...

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

Algorithm, Describe different methods of developing algorithms with example...

Describe different methods of developing algorithms with examples.

Algorithm for a function that takes in integer as argument, Write a detaile...

Write a detailed description of a function that takes in an integer as an argument, then prints out the squares of all positive integers whose squares are less than the input. (The

Explain merge sort, Question 1 Explain the use of algorithms in computing ...

Question 1 Explain the use of algorithms in computing Question 2 Explain time complexity and space complexity of an algorithm Question 3 Explain how you can analyz

Efficient way of storing two symmetric matrices, Explain an efficient way o...

Explain an efficient way of storing two symmetric matrices of the same order in memory. A n-square matrix array is said to be symmetric if a[j][k]=a[k][j] for all j and k. For

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