Binary Search Algorithm
Binary Search Algorithm
What is Search?
Search is a process of finding a value in a list of values. In other words, searching is the
process of locating given value position in a list of values.
Example
Consider the following list of elements and the element to be searched...
Implementation of Binary Search
Algorithm using C Programming Language
#include<stdio.h>
#include<conio.h>
void main()
{
int first, last, middle, size, i, sElement, list[100];
clrscr();
first = 0;
last = size - 1;
middle = (first+last)/2;
Output