Template Community / The Algorithm Flowchart Example

The Algorithm Flowchart Example

Share
Duplicate
1
0
Report
Publish time:07-16-2021
Binary search follows a divide and conquers approach in which the list is divided into two halves, and the item is compared with the middle element of the list. If the match is found then, the location of the middle element is returned; otherwise, we search into either of the halves depending upon the result produced through the match. The algorithm to understand all this is designed in the image below and can be understood by creating an algorithm where the first step is [INITIALIZE] SET BEG = lower_bound; END = upper_bound, POS = -1. The System will repeat this step while BEG <= END and SET MID = (BEG+END)/2.
Creator
profile image
Charlotte
profile image
Post
Recommended Templates
Publish
Your
Diagram