ALL > Computer and Education > courses > university courses > undergraduate courses > An Overview of Computer Science > ZSTU 2018-2019-1 class > student homework directory > 2018529627010_hw1 >
2018529627010_hw6 Version 0
👤 Author: by muratovauralskgmailcom 2018-11-25 09:53:00
Binary search is a search algorithm that finds the position of a target within the sorted array. Binary search compares the target value to the middle element of the array. If they are not equal, the half in which the target is absent is eliminated and the search continues on the remaining half, again taking the middle element to compare to the target value, and repeating this until the target value is found. If the search ends with the remaining half being empty, the target is not in the array. Which means it completes the task faster, rather than doing the comparison one by one.

Here is the picture of the how the algorithm works

Please login to reply. Login

Reversion History

Loading...
No reversions found.