# Binary Search

## Searching—Finding the specified record(s) in a given data structure on the basis of a given key value. Binary search is the method used for searching. For Example there are 100 employees working in the company and we have to give the increment only that employee whose employee number is 101, so this operation can be used to find the  employee detail with employee number 101.

In case of Binary search the first need is to sort the data in array due to  binary search work on sorted array. With the help of sorted element array we can search required data from the array very quickly.

In binary search the array list is divided into 2 equal parts.

# Insertion sort

Sorting is a process of rearranging the data items in ascending or descending order.Here the data items are shifted from one location to the other.

Insertion sort is implemented by inserting a particular element(single element) at the appropriate position. In this method, the first iteration starts with comparison of 1’s element(second element) with the 0’s element(first element). In the second iteration 2nd element(third element) is compared with the 0’s and 1’s element.

# Bubble Sort Program

Bubble  sort is most popular sorting technique because it is very simple to understand and implement. The algorithm achieves its name from the fact that,with each iteration the largest value moves like a bubble to the top of the array. The bubble sort method is not efficient for large arrays.

# Difference between Singly Linked Circular List and Doubly Linked Circular List

1)The structure of a node of singly linked  circular list is as follows:-

Struct list_type

{

Int data;

Struct list_type *next;

}

### Lists

1  LINK OR POINTER: A pointer also called a link or a reference, is defined to be a variable that give the location of some other variable(point to the next consecutive node), typically of a structure containing data.

•  Start
•  Prev
•  1  2  3  4
•  Next
•  End

Page 1 of 4