answersLogoWhite

0


Best Answer

the major limitation of binary search is that there is a need of sorted array to perform binary search operation.

if array is not sorted the output is either not correct or may be after a long number of steps and according to data structure the output should come in minimum number of steps.

User Avatar

Wiki User

13y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

14y ago

The disadvantage of binary search in any language is that you must provide an ordered list, usually an array, for the algorithm to search. Arrays are either static in size or, if dynamic, require special processing when they grow in size. A linked list does not work, because you need to make random access to the elements. The more generalized solution of a dynamic binary search is a binary tree, instead of a linked list, but trees also have special processing requirements and, in order to maintain O=LogN processing time, must have provision for being maintained in a balanced state. Its all a matter of tradeoff...

This answer is:
User Avatar

User Avatar

Wiki User

13y ago

When the list is small the sequential search is faster than a binary search. With a large list the binary search wins the race.

A binary search requires the list to be in sort order, a sequential search does not.

A sequential search is a brute force method.

A binary search is a divide and conquer method.

This answer is:
User Avatar

User Avatar

Wiki User

7y ago

The primary advantage of a binary search algorithm is that searching a sequence can be achieved in logarithmic time. The primary disadvantages are that the data must be in sorted order. Arrays are the ideal container for binary searches as they provide constant-time random-access and are therefore trivial to both sort and search efficiently. Sorted binary trees can also be used, however for optimal performance they must be totally balanced (e.g., red/black binary tree). Constant-time random-access is not a requirement of binary trees, however the cost of maintaining balance during construction of the tree has to be taken into account.

With a linear search, we start at one end of the sequence and traverse through the sequence one element at a time until we find the value we're looking for, or we reach the element one-past-the-end of the sequence (in which case the element we're looking for does not exist). For a sequence of n elements, the worst case is O(n). Linear search is ideal for forward lists (singly-linked lists) and lists (doubly-linked lists) as neither provides nor requires constant-time random-access.

With binary search, we locate the middle element in the sequence. If that's not the value we are looking for, we can easily determine which half of the sequence contains our value because the elements are in sorted order. So we eliminate the other half and repeat the algorithm with the remaining half. As such, each failure to find the value reduces the number of elements to be searched by half (plus the middle element). If there are no elements in the remaining half then the value does not exist. The worst case is therefore O(log n).

This answer is:
User Avatar

User Avatar

Wiki User

6y ago

The only real disadvantage of binary search is that we must adjust the tree every time a new node is inserted or an existing node is removed in order to maintain balance. A sorted array provides the best binary search performance at the expense of increased insertion and extraction times.

This answer is:
User Avatar

User Avatar

Wiki User

15y ago

the list should be sorted. if not try using linear list. the list should be sorted. if not try using linear list.

This answer is:
User Avatar

User Avatar

Wiki User

11y ago

the binary code is in the form of 0's and 1's so it can be detected and hacked by others . if the binary code will be some different the hacker cannot identify it

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

no answer

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What are the advantages and disadvantages of binary search algorithms?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What are the disadvantages of Fibonacci search?

There are a few disadvantages of the Fibonacci search: It can be slower than other search algorithms if the data is not sorted. It can be less accurate than other search algorithms if the data is not sorted. It can be more difficult to implement than other search algorithms.


What are the advantages and disadvantages of searching in C programming?

If the data is sorted and every element is directly accessible, then you can perform binary search (see built-in function bsearch), otherwise you have to do linear search (which is slower).


What are the advantages and disadvantages of hybrid search engines?

paul and anj


Describe the sequential and binary search develop the algorithms for the same?

both seach has different algorithem but the complexity will be same...


Advantages and disadvantages of banking system?

there are many advantages and disadvantages so i do not have time to tell you search anywhere else OHK?


What are the advantages and disadvantages of the babylonian number system?

search it your own self


What are the Advantages and disadvantages of using a Money Order?

search under your bed


What is the advantages and disadvantages about search engines?

The advantages of search engines are that they give information required by a person. The disadvantage is that it cannot see or feel that for what is that information required.


What are the disadvantages and advantages of using blekko search engine?

blekko merits and demerits


Advantages and disadvantages of binary search tree?

Advantages:BST is fast in insertion and deletion etc when balanced.Very efficient and its code is easier than link lists.Disadvantages:Shape of the tree depends upon order of insertion and it can be degenerated.Searching takes long time.


What are the advantages and disadvantages of business to an individual?

try these search results http://www.google.com/search?q=advantages+and+disadvantages+to+sole+proprietorship&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a


What are the advantages and disadvantages of howe truss?

well you can go on google and search it you might get the answer then come and tell us how about that?