Binary Search Algorithm

Why Binary Search Algorithm is a device and conquer based algorithm?

Questions by jigar.205301

Showing Answers 1 - 7 of 7 Answers

utthara

  • Feb 26th, 2010
 

The binary digit is searched from the given set of numbers by dividing the entire set into smaller groups.

  Was this answer useful?  Yes

ManiCPP

  • Apr 2nd, 2010
 

You probably meant 'Divide and Conquer'. This means you can recursively split your problem into smaller problems of the same type, until you reach a stage where you can solve your problem directly.
Binary search is a 'Divide and Conquer' algorithm because in each iteration you divide the sorted array in half and discard one of them using a simple check. You repeat this until you reach a single element (successful search) or no result at all.

Binary search algorithm is divide and conquer because in this algorithm, we simply reduces the size of search interval to half in each successive iteration by simply compares the mid value to the key to be search and in this way we divide (size of search interval) and conquer (by
reducing number of iteration so that time taken to search is less).

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions